diff options
-rw-r--r-- | common/module.mk | 2 | ||||
-rw-r--r-- | common/rdft.h | 3 | ||||
-rw-r--r-- | devtools/create_project/config.h | 1 | ||||
-rw-r--r-- | devtools/create_project/create_project.cpp | 6 | ||||
-rw-r--r-- | devtools/create_project/xcode.cpp | 49 | ||||
-rw-r--r-- | devtools/scumm-md5.txt | 1 | ||||
-rw-r--r-- | dists/samsungtv/scummvm.dat | 16 | ||||
-rw-r--r-- | engines/agos/agos.h | 3 | ||||
-rw-r--r-- | engines/agos/saveload.cpp | 21 | ||||
-rw-r--r-- | engines/drascula/detection.cpp | 57 | ||||
-rw-r--r-- | engines/dreamweb/dreamweb.cpp | 58 | ||||
-rw-r--r-- | engines/dreamweb/dreamweb.h | 1 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 8 | ||||
-rw-r--r-- | engines/scumm/scumm-md5.h | 3 | ||||
-rw-r--r-- | graphics/yuv_to_rgb.cpp | 71 | ||||
-rw-r--r-- | graphics/yuv_to_rgb.h | 5 | ||||
-rw-r--r-- | gui/themes/translations.dat | bin | 310405 -> 311215 bytes | |||
-rw-r--r-- | po/es_ES.po | 11 | ||||
-rw-r--r-- | po/fr_FR.po | 10 | ||||
-rw-r--r-- | po/hu_HU.po | 23 | ||||
-rw-r--r-- | po/it_IT.po | 11 | ||||
-rw-r--r-- | video/codecs/svq1.cpp | 12 | ||||
-rw-r--r-- | video/codecs/svq1.h | 2 | ||||
-rw-r--r-- | video/qt_decoder.cpp | 34 |
24 files changed, 288 insertions, 120 deletions
diff --git a/common/module.mk b/common/module.mk index b4928fabda..7e31ddfa01 100644 --- a/common/module.mk +++ b/common/module.mk @@ -41,7 +41,6 @@ MODULE_OBJS := \ xmlparser.o \ zlib.o -ifdef USE_BINK MODULE_OBJS += \ cosinetables.o \ dct.o \ @@ -49,7 +48,6 @@ MODULE_OBJS += \ huffman.o \ rdft.o \ sinetables.o -endif # Include common rules include $(srcdir)/rules.mk diff --git a/common/rdft.h b/common/rdft.h index 4bbde45d35..3386940404 100644 --- a/common/rdft.h +++ b/common/rdft.h @@ -39,6 +39,9 @@ namespace Common { /** * (Inverse) Real Discrete Fourier Transform. * + * Used in audio: + * - QDM2 + * * Used in engines: * - scumm */ diff --git a/devtools/create_project/config.h b/devtools/create_project/config.h index fecd95691e..20c1391cef 100644 --- a/devtools/create_project/config.h +++ b/devtools/create_project/config.h @@ -28,7 +28,6 @@ #define LIBS_DEFINE "SCUMMVM_LIBS" // Name of the include environment variable #define REVISION_DEFINE "SCUMMVM_INTERNAL_REVISION" -#define HAS_VIDEO_FOLDER 1 //#define ADDITIONAL_LIBRARY "" #define NEEDS_RTTI 0 diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index 61c609be67..062c03b648 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -575,7 +575,9 @@ int main(int argc, char *argv[]) { globalWarnings.push_back("-Wwrite-strings"); // The following are not warnings at all... We should consider adding them to // a different list of parameters. +#if !NEEDS_RTTI globalWarnings.push_back("-fno-rtti"); +#endif globalWarnings.push_back("-fno-exceptions"); globalWarnings.push_back("-fcheck-new"); @@ -1213,9 +1215,7 @@ void ProjectProvider::createProject(const BuildSetup &setup) { createModuleList(setup.srcDir + "/gui", setup.defines, in, ex); createModuleList(setup.srcDir + "/audio", setup.defines, in, ex); createModuleList(setup.srcDir + "/audio/softsynth/mt32", setup.defines, in, ex); -#if HAS_VIDEO_FOLDER createModuleList(setup.srcDir + "/video", setup.defines, in, ex); -#endif // Resource files in.push_back(setup.srcDir + "/icons/" + setup.projectName + ".ico"); @@ -1225,6 +1225,8 @@ void ProjectProvider::createProject(const BuildSetup &setup) { in.push_back(setup.srcDir + "/AUTHORS"); in.push_back(setup.srcDir + "/COPYING"); in.push_back(setup.srcDir + "/COPYING.LGPL"); + in.push_back(setup.srcDir + "/COPYING.BSD"); + in.push_back(setup.srcDir + "/COPYING.FREEFONT"); in.push_back(setup.srcDir + "/COPYRIGHT"); in.push_back(setup.srcDir + "/NEWS"); in.push_back(setup.srcDir + "/README"); diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp index eb51ab3da1..39470f4e19 100644 --- a/devtools/create_project/xcode.cpp +++ b/devtools/create_project/xcode.cpp @@ -20,6 +20,7 @@ * */ +#include "config.h" #include "xcode.h" #include <fstream> @@ -86,34 +87,34 @@ XCodeProvider::XCodeProvider(StringList &global_warnings, std::map<std::string, void XCodeProvider::createWorkspace(const BuildSetup &setup) { // Create project folder - std::string workspace = setup.outputDir + '/' + "scummvm.xcodeproj"; + std::string workspace = setup.outputDir + '/' + PROJECT_NAME ".xcodeproj"; #if defined(_WIN32) || defined(WIN32) if (!CreateDirectory(workspace.c_str(), NULL)) if (GetLastError() != ERROR_ALREADY_EXISTS) - error("Could not create folder \"" + setup.outputDir + '/' + "scummvm.xcodeproj\""); + error("Could not create folder \"" + setup.outputDir + '/' + PROJECT_NAME ".xcodeproj\""); #else if (mkdir(workspace.c_str(), 0777) == -1) { if (errno == EEXIST) { // Try to open as a folder (might be a file / symbolic link) DIR *dirp = opendir(workspace.c_str()); if (dirp == NULL) { - error("Could not create folder \"" + setup.outputDir + '/' + "scummvm.xcodeproj\""); + error("Could not create folder \"" + setup.outputDir + '/' + PROJECT_NAME ".xcodeproj\""); } else { // The folder exists, just close the stream and return closedir(dirp); } } else { - error("Could not create folder \"" + setup.outputDir + '/' + "scummvm.xcodeproj\""); + error("Could not create folder \"" + setup.outputDir + '/' + PROJECT_NAME ".xcodeproj\""); } } #endif // Setup global objects setupDefines(setup); - _targets.push_back("ScummVM-iPhone"); - _targets.push_back("ScummVM-OS X"); - _targets.push_back("ScummVM-Simulator"); + _targets.push_back(PROJECT_DESCRIPTION "-iPhone"); + _targets.push_back(PROJECT_DESCRIPTION "-OS X"); + _targets.push_back(PROJECT_DESCRIPTION "-Simulator"); setupCopyFilesBuildPhase(); setupFrameworksBuildPhase(); @@ -153,9 +154,9 @@ void XCodeProvider::createProjectFile(const std::string &, const std::string &, // Main Project file ////////////////////////////////////////////////////////////////////////// void XCodeProvider::ouputMainProjectFile(const BuildSetup &setup) { - std::ofstream project((setup.outputDir + '/' + "scummvm.xcodeproj" + '/' + "project.pbxproj").c_str()); + std::ofstream project((setup.outputDir + '/' + PROJECT_NAME ".xcodeproj" + '/' + "project.pbxproj").c_str()); if (!project) - error("Could not open \"" + setup.outputDir + '/' + "scummvm.xcodeproj" + '/' + "project.pbxproj\" for writing"); + error("Could not open \"" + setup.outputDir + '/' + PROJECT_NAME ".xcodeproj" + '/' + "project.pbxproj\" for writing"); ////////////////////////////////////////////////////////////////////////// // Header @@ -392,8 +393,8 @@ void XCodeProvider::setupNativeTarget() { target->addProperty("dependencies", "", "", SettingsNoValue|SettingsAsList); target->addProperty("name", _targets[i], "", SettingsNoValue|SettingsQuoteVariable); - target->addProperty("productName", "scummvm", "", SettingsNoValue); - target->addProperty("productReference", getHash("PBXFileReference_ScummVM.app_" + _targets[i]), "ScummVM.app", SettingsNoValue); + target->addProperty("productName", PROJECT_NAME, "", SettingsNoValue); + target->addProperty("productReference", getHash("PBXFileReference_" PROJECT_DESCRIPTION ".app_" + _targets[i]), PROJECT_DESCRIPTION ".app", SettingsNoValue); target->addProperty("productType", "com.apple.product-type.application", "", SettingsNoValue|SettingsQuoteVariable); _nativeTarget.add(target); @@ -405,7 +406,7 @@ void XCodeProvider::setupProject() { Object *project = new Object(this, "PBXProject", "PBXProject", "PBXProject", "", "Project object"); - project->addProperty("buildConfigurationList", getHash("XCConfigurationList_scummvm"), "Build configuration list for PBXProject \"scummvm\"", SettingsNoValue); + project->addProperty("buildConfigurationList", getHash("XCConfigurationList_scummvm"), "Build configuration list for PBXProject \"" PROJECT_NAME "\"", SettingsNoValue); project->addProperty("compatibilityVersion", "Xcode 3.2", "", SettingsNoValue|SettingsQuoteVariable); project->addProperty("developmentRegion", "English", "", SettingsNoValue); project->addProperty("hasScannedForEncodings", "1", "", SettingsNoValue); @@ -495,8 +496,8 @@ void XCodeProvider::setupResourcesBuildPhase() { } // Add custom files depending on the target - if (_targets[i] == "ScummVM-OS X") { - files.settings[getHash("PBXResources_scummvm.icns")] = Setting("", "scummvm.icns in Resources", SettingsNoValue, 0, 6); + if (_targets[i] == PROJECT_DESCRIPTION "-OS X") { + files.settings[getHash("PBXResources_" PROJECT_NAME ".icns")] = Setting("", PROJECT_NAME ".icns in Resources", SettingsNoValue, 0, 6); // Remove 2 iphone icon files files.settings.erase(getHash("PBXResources_Default.png")); @@ -526,7 +527,7 @@ void XCodeProvider::setupBuildConfiguration() { // ****************************************/ // Debug - Object *iPhone_Debug_Object = new Object(this, "XCBuildConfiguration_ScummVM-iPhone_Debug", _targets[0] /* ScummVM-iPhone */, "XCBuildConfiguration", "PBXNativeTarget", "Debug"); + Object *iPhone_Debug_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-iPhone_Debug", _targets[0] /* ScummVM-iPhone */, "XCBuildConfiguration", "PBXNativeTarget", "Debug"); Property iPhone_Debug; ADD_SETTING_QUOTE(iPhone_Debug, "ARCHS", "$(ARCHS_UNIVERSAL_IPHONE_OS)"); ADD_SETTING_QUOTE(iPhone_Debug, "CODE_SIGN_IDENTITY", "iPhone Developer"); @@ -558,7 +559,7 @@ void XCodeProvider::setupBuildConfiguration() { ADD_SETTING_LIST(iPhone_Debug, "LIBRARY_SEARCH_PATHS", iPhone_LibPaths, SettingsAsList, 5); ADD_SETTING(iPhone_Debug, "ONLY_ACTIVE_ARCH", "YES"); ADD_SETTING(iPhone_Debug, "PREBINDING", "NO"); - ADD_SETTING(iPhone_Debug, "PRODUCT_NAME", "ScummVM"); + ADD_SETTING(iPhone_Debug, "PRODUCT_NAME", PROJECT_DESCRIPTION); ADD_SETTING_QUOTE(iPhone_Debug, "PROVISIONING_PROFILE", "EF590570-5FAC-4346-9071-D609DE2B28D8"); ADD_SETTING_QUOTE_VAR(iPhone_Debug, "PROVISIONING_PROFILE[sdk=iphoneos*]", ""); ADD_SETTING(iPhone_Debug, "SDKROOT", "iphoneos4.0"); @@ -568,7 +569,7 @@ void XCodeProvider::setupBuildConfiguration() { iPhone_Debug_Object->properties["buildSettings"] = iPhone_Debug; // Release - Object *iPhone_Release_Object = new Object(this, "XCBuildConfiguration_ScummVM-iPhone_Release", _targets[0] /* ScummVM-iPhone */, "XCBuildConfiguration", "PBXNativeTarget", "Release"); + Object *iPhone_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-iPhone_Release", _targets[0] /* ScummVM-iPhone */, "XCBuildConfiguration", "PBXNativeTarget", "Release"); Property iPhone_Release(iPhone_Debug); ADD_SETTING(iPhone_Release, "GCC_OPTIMIZATION_LEVEL", "3"); ADD_SETTING(iPhone_Release, "COPY_PHASE_STRIP", "YES"); @@ -586,7 +587,7 @@ void XCodeProvider::setupBuildConfiguration() { ****************************************/ // Debug - Object *scummvm_Debug_Object = new Object(this, "XCBuildConfiguration_scummvm_Debug", "scummvm", "XCBuildConfiguration", "PBXProject", "Debug"); + Object *scummvm_Debug_Object = new Object(this, "XCBuildConfiguration_" PROJECT_NAME "_Debug", PROJECT_NAME, "XCBuildConfiguration", "PBXProject", "Debug"); Property scummvm_Debug; ADD_SETTING(scummvm_Debug, "ALWAYS_SEARCH_USER_PATHS", "NO"); ADD_SETTING_QUOTE(scummvm_Debug, "ARCHS", "$(ARCHS_STANDARD_32_BIT)"); @@ -623,7 +624,7 @@ void XCodeProvider::setupBuildConfiguration() { scummvm_Debug_Object->properties["buildSettings"] = scummvm_Debug; // Release - Object *scummvm_Release_Object = new Object(this, "XCBuildConfiguration_scummvm_Release", "scummvm", "XCBuildConfiguration", "PBXProject", "Release"); + Object *scummvm_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_NAME "_Release", PROJECT_NAME, "XCBuildConfiguration", "PBXProject", "Release"); Property scummvm_Release(scummvm_Debug); REMOVE_SETTING(scummvm_Release, "GCC_C_LANGUAGE_STANDARD"); // Not sure why we remove that, or any of the other warnings REMOVE_SETTING(scummvm_Release, "GCC_WARN_ABOUT_RETURN_TYPE"); @@ -641,7 +642,7 @@ void XCodeProvider::setupBuildConfiguration() { ****************************************/ // Debug - Object *scummvmOSX_Debug_Object = new Object(this, "XCBuildConfiguration_ScummVM-OSX_Debug", _targets[1] /* ScummVM-OS X */, "XCBuildConfiguration", "PBXNativeTarget", "Debug"); + Object *scummvmOSX_Debug_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-OSX_Debug", _targets[1] /* ScummVM-OS X */, "XCBuildConfiguration", "PBXNativeTarget", "Debug"); Property scummvmOSX_Debug; ADD_SETTING_QUOTE(scummvmOSX_Debug, "ARCHS", "$(NATIVE_ARCH)"); ADD_SETTING(scummvmOSX_Debug, "COMPRESS_PNG_FILES", "NO"); @@ -687,13 +688,13 @@ void XCodeProvider::setupBuildConfiguration() { scummvmOSX_LdFlags.push_back("-lz"); ADD_SETTING_LIST(scummvmOSX_Debug, "OTHER_LDFLAGS", scummvmOSX_LdFlags, SettingsAsList, 5); ADD_SETTING(scummvmOSX_Debug, "PREBINDING", "NO"); - ADD_SETTING(scummvmOSX_Debug, "PRODUCT_NAME", "ScummVM"); + ADD_SETTING(scummvmOSX_Debug, "PRODUCT_NAME", PROJECT_DESCRIPTION); scummvmOSX_Debug_Object->addProperty("name", "Debug", "", SettingsNoValue); scummvmOSX_Debug_Object->properties["buildSettings"] = scummvmOSX_Debug; // Release - Object *scummvmOSX_Release_Object = new Object(this, "XCBuildConfiguration_ScummVMOSX_Release", _targets[1] /* ScummVM-OS X */, "XCBuildConfiguration", "PBXNativeTarget", "Release"); + Object *scummvmOSX_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-OSX_Release", _targets[1] /* ScummVM-OS X */, "XCBuildConfiguration", "PBXNativeTarget", "Release"); Property scummvmOSX_Release(scummvmOSX_Debug); ADD_SETTING(scummvmOSX_Release, "COPY_PHASE_STRIP", "YES"); REMOVE_SETTING(scummvmOSX_Release, "GCC_DYNAMIC_NO_PIC"); @@ -711,7 +712,7 @@ void XCodeProvider::setupBuildConfiguration() { ****************************************/ // Debug - Object *scummvmSimulator_Debug_Object = new Object(this, "XCBuildConfiguration_ScummVM-Simulator_Debug", _targets[2] /* ScummVM-Simulator */, "XCBuildConfiguration", "PBXNativeTarget", "Debug"); + Object *scummvmSimulator_Debug_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-Simulator_Debug", _targets[2] /* ScummVM-Simulator */, "XCBuildConfiguration", "PBXNativeTarget", "Debug"); Property scummvmSimulator_Debug(iPhone_Debug); ADD_SETTING_QUOTE(scummvmSimulator_Debug, "FRAMEWORK_SEARCH_PATHS", "$(inherited)"); ADD_SETTING_LIST(scummvmSimulator_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvm_defines, SettingsNoQuote|SettingsAsList, 5); @@ -722,7 +723,7 @@ void XCodeProvider::setupBuildConfiguration() { scummvmSimulator_Debug_Object->properties["buildSettings"] = scummvmSimulator_Debug; // Release - Object *scummvmSimulator_Release_Object = new Object(this, "XCBuildConfiguration_ScummVM-Simulator_Release", _targets[2] /* ScummVM-Simulator */, "XCBuildConfiguration", "PBXNativeTarget", "Release"); + 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"); REMOVE_SETTING(scummvmSimulator_Release, "GCC_DYNAMIC_NO_PIC"); diff --git a/devtools/scumm-md5.txt b/devtools/scumm-md5.txt index eab7cbbcc8..01d806a484 100644 --- a/devtools/scumm-md5.txt +++ b/devtools/scumm-md5.txt @@ -801,6 +801,7 @@ balloon Putt-Putt and Pep's Balloon-O-Rama 145bd3373574feb668cc2eea2ec6cf86 -1 ru Windows HE 80 - - sev 27b2ef1653089fe5b897d9cc89ce784f -1 ru Windows HE 80 - - George Kormendi 2232b0b9411575b1f9961713ebc9de61 -1 All Windows HE 80 - ES and NL exiltd (ES), Ben Castricum (NL) + a22af0ad0e3126d19d22707b0267a37d -1 nl Windows HE 80 - - Ben Castricum a56a05c6b865b9956639f8c51269e5ab -1 nl Mac HE 80 - - Ben Castricum d7b247c26bf1f01f8f7daf142be84de3 -1 en Windows HE 99 Updated - iziku 8e3241ddd6c8dadf64305e8740d45e13 -1 en All HE 100 Updated - Kirben diff --git a/dists/samsungtv/scummvm.dat b/dists/samsungtv/scummvm.dat index 19d734467b..57e4b1ca6f 100644 --- a/dists/samsungtv/scummvm.dat +++ b/dists/samsungtv/scummvm.dat @@ -14,10 +14,10 @@ 0x0031,0x0000, 0x0031,0x0000, [Vendor] -0x0073,0x0063,0x0075,0x006d,0x006d,0x0076,0x006d,0x002e,0x006f,0x0067,0x0000, -0x0073,0x0063,0x0075,0x006d,0x006d,0x0076,0x006d,0x002e,0x006f,0x0067,0x0000, -0x0073,0x0063,0x0075,0x006d,0x006d,0x0076,0x006d,0x002e,0x006f,0x0067,0x0000, -0x0073,0x0063,0x0075,0x006d,0x006d,0x0076,0x006d,0x002e,0x006f,0x0067,0x0000, +0x0073,0x0063,0x0075,0x006d,0x006d,0x0076,0x006d,0x002e,0x006f,0x0072,0x0067,0x0000, +0x0073,0x0063,0x0075,0x006d,0x006d,0x0076,0x006d,0x002e,0x006f,0x0072,0x0067,0x0000, +0x0073,0x0063,0x0075,0x006d,0x006d,0x0076,0x006d,0x002e,0x006f,0x0072,0x0067,0x0000, +0x0073,0x0063,0x0075,0x006d,0x006d,0x0076,0x006d,0x002e,0x006f,0x0072,0x0067,0x0000, [Release_Date] 0x0000, 0x0000, @@ -26,16 +26,16 @@ [Description] 0x0049,0x006e,0x0074,0x0065,0x0072,0x0070,0x0072,0x0065,0x0074,0x0065,0x0072,0x0020,0x0066,0x006F,0x0072,0x0020,0x00 73,0x0065,0x0076,0x0065,0x0072,0x0061,0x006C,0x0020,0x0061,0x0064,0x0076,0x0065,0x006E,0x0074,0x0075,0x0072,0x0065,0 -x0020,,0x0067,0x0061,0x006D,0x0065,0x0073,,0x0000, +x0020,0x0067,0x0061,0x006D,0x0065,0x0073,0x0000, 0x0049,0x006e,0x0074,0x0065,0x0072,0x0070,0x0072,0x0065,0x0074,0x0065,0x0072,0x0020,0x0066,0x006F,0x0072,0x0020,0x00 73,0x0065,0x0076,0x0065,0x0072,0x0061,0x006C,0x0020,0x0061,0x0064,0x0076,0x0065,0x006E,0x0074,0x0075,0x0072,0x0065,0 -x0020,,0x0067,0x0061,0x006D,0x0065,0x0073,,0x0000, +x0020,0x0067,0x0061,0x006D,0x0065,0x0073,0x0000, 0x0049,0x006e,0x0074,0x0065,0x0072,0x0070,0x0072,0x0065,0x0074,0x0065,0x0072,0x0020,0x0066,0x006F,0x0072,0x0020,0x00 73,0x0065,0x0076,0x0065,0x0072,0x0061,0x006C,0x0020,0x0061,0x0064,0x0076,0x0065,0x006E,0x0074,0x0075,0x0072,0x0065,0 -x0020,,0x0067,0x0061,0x006D,0x0065,0x0073,,0x0000, +x0020,0x0067,0x0061,0x006D,0x0065,0x0073,0x0000, 0x0049,0x006e,0x0074,0x0065,0x0072,0x0070,0x0072,0x0065,0x0074,0x0065,0x0072,0x0020,0x0066,0x006F,0x0072,0x0020,0x00 73,0x0065,0x0076,0x0065,0x0072,0x0061,0x006C,0x0020,0x0061,0x0064,0x0076,0x0065,0x006E,0x0074,0x0075,0x0072,0x0065,0 -x0020,,0x0067,0x0061,0x006D,0x0065,0x0073,,0x0000, +x0020,0x0067,0x0061,0x006D,0x0065,0x0073,0x0000, [JoyStick_Support] 0 [icon_path] diff --git a/engines/agos/agos.h b/engines/agos/agos.h index d9f982a0fa..65f8dd1420 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -1265,7 +1265,7 @@ protected: virtual void doOutput(const byte *src, uint len); void clsCheck(WindowBlock *window); - void quickLoadOrSave(); + virtual void quickLoadOrSave(); byte *vc10_uncompressFlip(const byte *src, uint16 w, uint16 h); byte *vc10_flip(const byte *src, uint16 w, uint16 h); @@ -2060,6 +2060,7 @@ protected: void windowBackSpace(WindowBlock *window); virtual char *genSaveName(int slot); + virtual void quickLoadOrSave(); }; class AGOSEngine_FeebleDemo : public AGOSEngine_Feeble { diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp index 4fbde09ff8..b3ec916b47 100644 --- a/engines/agos/saveload.cpp +++ b/engines/agos/saveload.cpp @@ -136,12 +136,25 @@ char *AGOSEngine::genSaveName(int slot) { return buf; } +#ifdef ENABLE_AGOS2 +void AGOSEngine_Feeble::quickLoadOrSave() { + // Quick loading and saving isn't possible in The Feeble Files or Puzzle Pack. +} +#endif + void AGOSEngine::quickLoadOrSave() { - // Quick load & save is only supported complete version of Simon the Sorcerer 1/2 - if (getGameType() == GType_PP || getGameType() == GType_FF || - (getFeatures() & GF_DEMO)) { + // 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; diff --git a/engines/drascula/detection.cpp b/engines/drascula/detection.cpp index 3310ac0598..6e38d49b94 100644 --- a/engines/drascula/detection.cpp +++ b/engines/drascula/detection.cpp @@ -23,6 +23,7 @@ #include "base/plugins.h" #include "engines/advancedDetector.h" +#include "engines/savestate.h" #include "common/file.h" #include "drascula/drascula.h" @@ -271,6 +272,62 @@ public: _guioptions = GUIO2(GUIO_NOMIDI, GUIO_NOLAUNCHLOAD); } + virtual bool hasFeature(MetaEngineFeature f) const { + return (f == kSupportsListSaves); + } + + virtual SaveStateList listSaves(const char *target) const { + Common::SaveFileManager *saveFileMan = g_system->getSavefileManager(); + Common::String pattern = Common::String::format("%s??", target); + + // Get list of savefiles for target game + Common::StringArray filenames = saveFileMan->listSavefiles(pattern); + Common::Array<int> slots; + for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) { + + // Obtain the last 2 digits of the filename, since they correspond to the save slot + int slotNum = atoi(file->c_str() + file->size() - 2); + + // Ensure save slot is within valid range + if (slotNum >= 1 && slotNum <= 10) { + slots.push_back(slotNum); + } + } + + // Sort save slot ids + Common::sort<int>(slots.begin(), slots.end()); + + // Load save index + Common::String fileEpa = Common::String::format("%s.epa", target); + Common::InSaveFile *epa = saveFileMan->openForLoading(fileEpa); + + // Get savegame names from index + Common::String saveDesc; + SaveStateList saveList; + int line = 1; + for (size_t i = 0; i < slots.size(); i++) { + // ignore lines corresponding to unused saveslots + for (; line < slots[i]; line++) + epa->readLine(); + + // copy the name in the line corresponding to the save slot and truncate to 22 characters + saveDesc = Common::String(epa->readLine().c_str(), 22); + + // handle cases where the save directory and save index are detectably out of sync + if (saveDesc == "*") + saveDesc = "No name specified."; + + // increment line number to keep it in sync with slot number + line++; + + // Insert savegame name into list + saveList.push_back(SaveStateDescriptor(slots[i], saveDesc)); + } + delete epa; + + return saveList; + } + virtual const char *getName() const { return "Drascula"; } diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp index a846579e46..2e9c7bb2b8 100644 --- a/engines/dreamweb/dreamweb.cpp +++ b/engines/dreamweb/dreamweb.cpp @@ -63,6 +63,20 @@ DreamWebEngine::DreamWebEngine(OSystem *syst, const DreamWebGameDescription *gam _channel1 = 0; _datafilePrefix = "DREAMWEB."; + // ES and FR CD release use a different data file prefix + if (isCD()) { + switch(getLanguage()) { + case Common::ES_ESP: + _datafilePrefix = "DREAMWSP."; + break; + case Common::FR_FRA: + _datafilePrefix = "DREAMWFR."; + break; + default: + // Nothing to do + break; + } + } _openChangeSize = kInventx+(4*kItempicsize); _quitRequested = false; @@ -526,10 +540,54 @@ uint8 DreamWebEngine::modifyChar(uint8 c) const { default: return c; } + case Common::FR_FRA: + switch(c) { + case 133: + return 'Z' + 1; + case 130: + return 'Z' + 2; + case 138: + return 'Z' + 3; + case 136: + return 'Z' + 4; + case 140: + return 'Z' + 5; + case 135: + return 'Z' + 6; + case 149: + return ',' - 1; + case 131: + return ',' - 2; + case 141: + return ',' - 3; + case 139: + return ',' - 4; + case 151: + return 'A' - 1; + case 147: + return 'A' - 3; + case 150: + return 'A' - 4; + default: + return c; + } default: return c; } } + +Common::String DreamWebEngine::modifyFileName(const char *name) { + Common::String fileName(name); + + // Sanity check + if (!fileName.hasPrefix("DREAMWEB.")) + return fileName; + + // Make sure we use the correct file name as it differs depending on the game variant + fileName = _datafilePrefix; + fileName += name + 9; + return fileName; +} bool DreamWebEngine::hasSpeech() { return isCD() && _hasSpeech; diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h index 13a27449dc..4065e5a860 100644 --- a/engines/dreamweb/dreamweb.h +++ b/engines/dreamweb/dreamweb.h @@ -149,6 +149,7 @@ public: Common::Language getLanguage() const; uint8 modifyChar(uint8 c) const; + Common::String modifyFileName(const char *); void stopSound(uint8 channel); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 8226982db7..5a53b82510 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -2090,8 +2090,8 @@ void DreamWebEngine::getRidOfAll() { void DreamWebEngine::loadRoomData(const Room &room, bool skipDat) { processEvents(); Common::File file; - if (!file.open(room.name)) - error("cannot open file %s", room.name); + if (!file.open(modifyFileName(room.name))) + error("cannot open file %s", modifyFileName(room.name).c_str()); FileHeader header; file.read((uint8 *)&header, sizeof(FileHeader)); @@ -2176,8 +2176,8 @@ void DreamWebEngine::restoreReels() { processEvents(); Common::File file; - if (!file.open(room.name)) - error("cannot open file %s", room.name); + if (!file.open(modifyFileName(room.name))) + error("cannot open file %s", modifyFileName(room.name).c_str()); FileHeader header; file.read((uint8 *)&header, sizeof(FileHeader)); diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h index 39a1dc9b46..c25c875616 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 Mar 20 19:59:40 2012 + This file was generated by the md5table tool on Mon Apr 9 12:23:48 2012 DO NOT EDIT MANUALLY! */ @@ -431,6 +431,7 @@ static const MD5Table md5table[] = { { "a0a7dea72003933b8b3f8b99b9f7ddeb", "loom", "No AdLib", "EGA", -1, Common::EN_ANY, Common::kPlatformAtariST }, { "a194f15f51ee62badab74b9e7da97693", "baseball2001", "", "Demo", 20507, Common::EN_ANY, Common::kPlatformUnknown }, { "a197a87ae77f3b3333f09a7a2c448fe2", "freddi", "HE 99", "Updated", -1, Common::EN_ANY, Common::kPlatformWindows }, + { "a22af0ad0e3126d19d22707b0267a37d", "balloon", "HE 80", "", -1, Common::NL_NLD, Common::kPlatformWindows }, { "a2386da005672cbd5136f4f27a626c5f", "farm", "", "", 87061, Common::NL_NLD, Common::kPlatformWindows }, { "a28135a7ade38cc0208b04507c46efd1", "spyfox", "HE 99", "", -1, Common::DE_DEU, Common::kPlatformUnknown }, { "a2bb6aa0537402c1b3c2ea899ccef64b", "lost", "HE 99", "Demo", 15540, Common::EN_ANY, Common::kPlatformWindows }, diff --git a/graphics/yuv_to_rgb.cpp b/graphics/yuv_to_rgb.cpp index e0af267106..78903d0cd8 100644 --- a/graphics/yuv_to_rgb.cpp +++ b/graphics/yuv_to_rgb.cpp @@ -300,19 +300,32 @@ void convertYUV420ToRGB(Graphics::Surface *dst, const byte *ySrc, const byte *uS convertYUV420ToRGB<uint32>((byte *)dst->pixels, dst->pitch, lookup, ySrc, uSrc, vSrc, yWidth, yHeight, yPitch, uvPitch); } -#define OUTPUT_4_PIXEL_COLUMN() \ +#define READ_QUAD(ptr, prefix) \ + byte prefix##A = ptr[index]; \ + byte prefix##B = ptr[index + 1]; \ + byte prefix##C = ptr[index + uvPitch]; \ + byte prefix##D = ptr[index + uvPitch + 1] + +#define DO_INTERPOLATION(out) \ + out = (out##A * (4 - xDiff) * (4 - yDiff) + out##B * xDiff * (4 - yDiff) + \ + out##C * yDiff * (4 - xDiff) + out##D * xDiff * yDiff) >> 4 + +#define DO_YUV410_PIXEL() \ + DO_INTERPOLATION(u); \ + DO_INTERPOLATION(v); \ + \ + cr_r = Cr_r_tab[v]; \ + crb_g = Cr_g_tab[v] + Cb_g_tab[u]; \ + cb_b = Cb_b_tab[u]; \ + \ PUT_PIXEL(*ySrc, dstPtr); \ - PUT_PIXEL(*(ySrc + yPitch), dstPtr + dstPitch); \ - PUT_PIXEL(*(ySrc + (yPitch << 1)), dstPtr + dstPitch * 2); \ - PUT_PIXEL(*(ySrc + (yPitch * 3)), dstPtr + dstPitch * 3); \ + dstPtr += sizeof(PixelInt); \ + \ ySrc++; \ - dstPtr += sizeof(PixelInt) + xDiff++ template<typename PixelInt> void convertYUV410ToRGB(byte *dstPtr, int dstPitch, const YUVToRGBLookup *lookup, const byte *ySrc, const byte *uSrc, const byte *vSrc, int yWidth, int yHeight, int yPitch, int uvPitch) { - int quarterHeight = yHeight >> 2; - int quarterWidth = yWidth >> 2; - // Keep the tables in pointers here to avoid a dereference on each pixel const int16 *Cr_r_tab = lookup->_colorTab; const int16 *Cr_g_tab = Cr_r_tab + 256; @@ -320,29 +333,41 @@ void convertYUV410ToRGB(byte *dstPtr, int dstPitch, const YUVToRGBLookup *lookup const int16 *Cb_b_tab = Cb_g_tab + 256; const uint32 *rgbToPix = lookup->_rgbToPix; - for (int h = 0; h < quarterHeight; h++) { - for (int w = 0; w < quarterWidth; w++) { + int quarterWidth = yWidth >> 2; + + for (int y = 0; y < yHeight; y++) { + for (int x = 0; x < quarterWidth; x++) { + // Perform bilinear interpolation on the the chroma values + // Based on the algorithm found here: http://tech-algorithm.com/articles/bilinear-image-scaling/ + // Feel free to optimize further + int targetY = y >> 2; + int xDiff = 0; + int yDiff = y & 3; + int index = targetY * uvPitch + x; + + // Declare some variables for the following macros + byte u, v; + int16 cr_r, crb_g, cb_b; register const uint32 *L; - int16 cr_r = Cr_r_tab[*vSrc]; - int16 crb_g = Cr_g_tab[*vSrc] + Cb_g_tab[*uSrc]; - int16 cb_b = Cb_b_tab[*uSrc]; - ++uSrc; - ++vSrc; + READ_QUAD(uSrc, u); + READ_QUAD(vSrc, v); - OUTPUT_4_PIXEL_COLUMN(); - OUTPUT_4_PIXEL_COLUMN(); - OUTPUT_4_PIXEL_COLUMN(); - OUTPUT_4_PIXEL_COLUMN(); + DO_YUV410_PIXEL(); + DO_YUV410_PIXEL(); + DO_YUV410_PIXEL(); + DO_YUV410_PIXEL(); } - dstPtr += dstPitch * 3; - ySrc += (yPitch << 2) - yWidth; - uSrc += uvPitch - quarterWidth; - vSrc += uvPitch - quarterWidth; + dstPtr += dstPitch - yWidth * sizeof(PixelInt); + ySrc += yPitch - yWidth; } } +#undef READ_QUAD +#undef DO_INTERPOLATION +#undef DO_YUV410_PIXEL + void convertYUV410ToRGB(Graphics::Surface *dst, const byte *ySrc, const byte *uSrc, const byte *vSrc, int yWidth, int yHeight, int yPitch, int uvPitch) { // Sanity checks assert(dst && dst->pixels); diff --git a/graphics/yuv_to_rgb.h b/graphics/yuv_to_rgb.h index 52ab2ebdfb..73a2c69d7d 100644 --- a/graphics/yuv_to_rgb.h +++ b/graphics/yuv_to_rgb.h @@ -67,6 +67,11 @@ void convertYUV420ToRGB(Graphics::Surface *dst, const byte *ySrc, const byte *uS /** * Convert a YUV410 image to an RGB surface * + * Since the chroma has a very low resolution in 410, we perform bilinear scaling + * on the two chroma planes to produce the image. The chroma planes must have + * at least one extra row that can be read from in order to produce a proper + * image (filled with 0x80). This is required in order to speed up this function. + * * @param dst the destination surface * @param ySrc the source of the y component * @param uSrc the source of the u component diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat Binary files differindex c196db0e20..a9645f226a 100644 --- a/gui/themes/translations.dat +++ b/gui/themes/translations.dat diff --git a/po/es_ES.po b/po/es_ES.po index c825e9de4f..2be6dd051c 100644 --- a/po/es_ES.po +++ b/po/es_ES.po @@ -1373,24 +1373,23 @@ msgstr "Voces y sub." #: engines/scumm/dialogs.cpp:653 msgid "Select a Proficiency Level." -msgstr "" +msgstr "Selecciona un nivel de dificultad." #: engines/scumm/dialogs.cpp:655 msgid "Refer to your Loom(TM) manual for help." -msgstr "" +msgstr "Mira en el Manual para mayor información." #: engines/scumm/dialogs.cpp:658 -#, fuzzy msgid "Standard" -msgstr "Estándar (16bpp)" +msgstr "Estándar" #: engines/scumm/dialogs.cpp:659 msgid "Practice" -msgstr "" +msgstr "Práctica" #: engines/scumm/dialogs.cpp:660 msgid "Expert" -msgstr "" +msgstr "Experto" #: engines/scumm/help.cpp:73 msgid "Common keyboard commands:" diff --git a/po/fr_FR.po b/po/fr_FR.po index d937777ea5..bf6ac4424d 100644 --- a/po/fr_FR.po +++ b/po/fr_FR.po @@ -1380,23 +1380,23 @@ msgstr "Voix & ST" #: engines/scumm/dialogs.cpp:653 msgid "Select a Proficiency Level." -msgstr "" +msgstr "Sélectionnez un niveau de compétence." #: engines/scumm/dialogs.cpp:655 msgid "Refer to your Loom(TM) manual for help." -msgstr "" +msgstr "Reportez-vous ŕ votre manuel d'instruction." #: engines/scumm/dialogs.cpp:658 msgid "Standard" -msgstr "Standard" +msgstr "Normal" #: engines/scumm/dialogs.cpp:659 msgid "Practice" -msgstr "" +msgstr "Essai" #: engines/scumm/dialogs.cpp:660 msgid "Expert" -msgstr "" +msgstr "Expert" #: engines/scumm/help.cpp:73 msgid "Common keyboard commands:" diff --git a/po/hu_HU.po b/po/hu_HU.po index f230c84d1a..76e01da44b 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-03-07 22:09+0000\n" -"PO-Revision-Date: 2012-02-17 07:10+0100\n" +"PO-Revision-Date: 2012-04-18 08:20+0100\n" "Last-Translator: Gruby <grubycza@hotmail.com>\n" "Language-Team: Hungarian\n" "MIME-Version: 1.0\n" @@ -1158,13 +1158,13 @@ msgstr "" "README-t az alap információkról, és hogy hogyan segíthetsz a későbbiekben." #: 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 "" -"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." +"(%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/mohawk/dialogs.cpp:174 @@ -1225,13 +1225,13 @@ msgstr "" "Nézd meg a README fájlt a részletekért." #: 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 "" -"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." +"(%s) játékállás betöltése nem sikerült!. Olvassd el a README-t az alap " +"információkról, és hogy hogyan segíthetsz a későbbiekben." #: engines/engine.cpp:439 msgid "" @@ -2083,7 +2083,7 @@ msgstr "" #: engines/sword1/animation.cpp:539 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" -msgstr "" +msgstr "'%s' PSX stream átvezető nem játszható le paletta módban" #: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455 msgid "DXA cutscenes found but ScummVM has been built without zlib support" @@ -2138,10 +2138,11 @@ msgid "This is the end of the Broken Sword 1 Demo" msgstr "Ez a Broken Sword 1 Demo vége" #: engines/sword2/animation.cpp:435 -#, fuzzy msgid "" "PSX cutscenes found but ScummVM has been built without RGB color support" -msgstr "DXA átvezető elérhető, de a ScummVM zlib támogatás nincs lefordítva" +msgstr "" +"PSX átvezetőfilmet találtam, de ez a ScummVM RGB színtámogatás nélkül van " +"lefordítva" #: engines/parallaction/saveload.cpp:133 #, c-format @@ -2289,7 +2290,7 @@ msgstr " (Aktív)" #: backends/keymapper/remap-dialog.cpp:106 msgid " (Blocked)" -msgstr "" +msgstr " (Blokkolt)" #: backends/keymapper/remap-dialog.cpp:119 msgid " (Global)" diff --git a/po/it_IT.po b/po/it_IT.po index 29811d81ff..8ac8a62216 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -1374,24 +1374,23 @@ msgstr "Voci e testo" #: engines/scumm/dialogs.cpp:653 msgid "Select a Proficiency Level." -msgstr "" +msgstr "Selezionate un livello di difficoltŕ." #: engines/scumm/dialogs.cpp:655 msgid "Refer to your Loom(TM) manual for help." -msgstr "" +msgstr "Consultate il manuale delle istruzioni." #: engines/scumm/dialogs.cpp:658 -#, fuzzy msgid "Standard" -msgstr "Standard (16bpp)" +msgstr "Medio" #: engines/scumm/dialogs.cpp:659 msgid "Practice" -msgstr "" +msgstr "Base" #: engines/scumm/dialogs.cpp:660 msgid "Expert" -msgstr "" +msgstr "Expert" #: engines/scumm/help.cpp:73 msgid "Common keyboard commands:" diff --git a/video/codecs/svq1.cpp b/video/codecs/svq1.cpp index dc64429d4a..eba0c90305 100644 --- a/video/codecs/svq1.cpp +++ b/video/codecs/svq1.cpp @@ -191,14 +191,18 @@ const Graphics::Surface *SVQ1Decoder::decodeImage(Common::SeekableReadStream *st for (int i = 0; i < 3; i++) { int width, height; if (i == 0) { - width = yWidth; + width = yWidth; height = yHeight; + current[i] = new byte[width * height]; } else { - width = uvWidth; + width = uvWidth; height = uvHeight; - } - current[i] = new byte[width * height]; + // Add an extra row's worth of data to not go out-of-bounds in the + // color conversion. Then fill that with "empty" data. + current[i] = new byte[width * (height + 1)]; + memset(current[i] + width * height, 0x80, width); + } if (frameType == 0) { // I Frame // Keyframe (I) diff --git a/video/codecs/svq1.h b/video/codecs/svq1.h index df22d4b7de..e5066abfd4 100644 --- a/video/codecs/svq1.h +++ b/video/codecs/svq1.h @@ -28,7 +28,7 @@ namespace Common { class BitStream; class Huffman; -class Point; +struct Point; } namespace Video { diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp index df839610a1..0d80c93a1f 100644 --- a/video/qt_decoder.cpp +++ b/video/qt_decoder.cpp @@ -152,7 +152,13 @@ const Graphics::Surface *QuickTimeDecoder::decodeNextFrame() { // (needs to be done after we find the next track) updateAudioBuffer(); - if (_scaledSurface) { + // We have to initialize the scaled surface + if (frame && (_scaleFactorX != 1 || _scaleFactorY != 1)) { + if (!_scaledSurface) { + _scaledSurface = new Graphics::Surface(); + _scaledSurface->create(_width, _height, getPixelFormat()); + } + scaleSurface(frame, _scaledSurface, _scaleFactorX, _scaleFactorY); return _scaledSurface; } @@ -258,14 +264,10 @@ void QuickTimeDecoder::init() { _nextVideoTrack = findNextVideoTrack(); if (_nextVideoTrack) { - // Initialize the scaled surface if (_scaleFactorX != 1 || _scaleFactorY != 1) { - // We have to initialize the scaled surface - _scaledSurface = new Graphics::Surface(); - _scaledSurface->create((_nextVideoTrack->getWidth() / _scaleFactorX).toInt(), - (_nextVideoTrack->getHeight() / _scaleFactorY).toInt(), getPixelFormat()); - _width = _scaledSurface->w; - _height = _scaledSurface->h; + // 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(); @@ -527,19 +529,12 @@ void QuickTimeDecoder::AudioTrackHandler::seekToTime(Audio::Timestamp time) { } QuickTimeDecoder::VideoTrackHandler::VideoTrackHandler(QuickTimeDecoder *decoder, Common::QuickTimeParser::Track *parent) : TrackHandler(decoder, parent) { - if (_parent->scaleFactorX != 1 || _parent->scaleFactorY != 1) { - _scaledSurface = new Graphics::Surface(); - _scaledSurface->create(getWidth().toInt(), getHeight().toInt(), getPixelFormat()); - } else { - _scaledSurface = 0; - } - enterNewEditList(false); _holdNextFrameStartTime = false; _curFrame = -1; _durationOverride = -1; - + _scaledSurface = 0; } QuickTimeDecoder::VideoTrackHandler::~VideoTrackHandler() { @@ -576,7 +571,12 @@ const Graphics::Surface *QuickTimeDecoder::VideoTrackHandler::decodeNextFrame() enterNewEditList(true); } - if (_scaledSurface) { + if (frame && (_parent->scaleFactorX != 1 || _parent->scaleFactorY != 1)) { + if (!_scaledSurface) { + _scaledSurface = new Graphics::Surface(); + _scaledSurface->create(getWidth().toInt(), getHeight().toInt(), getPixelFormat()); + } + _decoder->scaleSurface(frame, _scaledSurface, _parent->scaleFactorX, _parent->scaleFactorY); return _scaledSurface; } |