[Scummvm-git-logs] scummvm master -> 53ccfaea30ed4e2be403d628d2d93443c481a6e7
sev-
noreply at scummvm.org
Wed Oct 16 23:47:00 UTC 2024
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
116dea7c9e QDENGINE: Added support for 3mice2-demo2
53ccfaea30 QDENGINE: Fix warning
Commit: 116dea7c9e18acf544f97f8dc15f36692a48d685
https://github.com/scummvm/scummvm/commit/116dea7c9e18acf544f97f8dc15f36692a48d685
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-17T01:46:05+02:00
Commit Message:
QDENGINE: Added support for 3mice2-demo2
The demo contains only one video but it is encoded in MP4 format,
obviously to save the space (9MB vs 32MB in the full version, MP1).
I recoded video with ffmpeg:
ffmpeg -i martha.mpg -b:v 6000k -maxrate:v 9000k martha-new.mpeg
The fun fact is that this video in the full game is broken: the video
freezes near the end. Thus, recoding the video is the way to go.
Changed paths:
engines/qdengine/detection.cpp
engines/qdengine/detection_tables.h
engines/qdengine/qdcore/qd_game_dispatcher.cpp
engines/qdengine/qdengine.cpp
engines/qdengine/qdengine.h
diff --git a/engines/qdengine/detection.cpp b/engines/qdengine/detection.cpp
index 2f8db368b8a..80ed8888482 100644
--- a/engines/qdengine/detection.cpp
+++ b/engines/qdengine/detection.cpp
@@ -53,6 +53,7 @@ class QDEngineMetaEngineDetection : public AdvancedMetaEngineDetection<ADGameDes
public:
QDEngineMetaEngineDetection() : AdvancedMetaEngineDetection(QDEngine::GAME_DESCRIPTIONS, QDEngine::GAME_NAMES) {
+ _flags = kADFlagMatchFullPaths;
}
~QDEngineMetaEngineDetection() override {}
diff --git a/engines/qdengine/detection_tables.h b/engines/qdengine/detection_tables.h
index d75ac9b3c51..4931b6d4d8b 100644
--- a/engines/qdengine/detection_tables.h
+++ b/engines/qdengine/detection_tables.h
@@ -48,7 +48,7 @@ const PlainGameDescriptor GAME_NAMES[] = {
AD_ENTRY2s("qd_game.qml", md5, size, exefile, exemd5, exesize), \
lang, \
Common::kPlatformWindows, \
- ADGF_UNSTABLE | ADGF_DROPPLATFORM, \
+ (ADGF_UNSTABLE | ADGF_DROPPLATFORM | flags), \
GUIO1(GUIO_NONE) \
}
@@ -134,8 +134,33 @@ const ADGameDescription GAME_DESCRIPTIONS[] = {
//GAMEl("3mice2", "???", 8176962, Common::CZ_CZE),
GAMEd("3mice2", "dfd98feb2e7d3345a7babdeb3ed3e9a7", 800666, // Demo1
"demo1.exe", "ffe20c2dbb131b01fccc1211a41e76e7", 962560),
- GAMEd("3mice2", "6af4c6f11cf0994670bedb78efe22267", 1124576, // Demo2
- "demo2.exe", "ffe20c2dbb131b01fccc1211a41e76e7", 962560),
+
+ { // Demo2, original
+ // Video is in MP4 format which is not supported
+ "3mice2",
+ "Original",
+ AD_ENTRY3s("qd_game.qml", "6af4c6f11cf0994670bedb78efe22267", 1124576, // Demo2
+ "demo2.exe", "ffe20c2dbb131b01fccc1211a41e76e7", 962560,
+ "Resource/Video/martha.mpg", "02850c5fc074eba22b368cca0ff57c98", 9810104),
+ Common::RU_RUS,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE | ADGF_DROPPLATFORM | ADGF_DEMO | GF_BROKEN_VIDEOS,
+ GUIO1(GUIO_NONE)
+ },
+
+ { // Demo2, original
+ // Video is recoded with: ffmpeg -i martha.mpg -b:v 6000k -maxrate:v 9000k martha-new.mpeg
+ // The full game has this video also broken: the video frames get frozen at the last several seconds
+ "3mice2",
+ "Recoded video",
+ AD_ENTRY3s("qd_game.qml", "6af4c6f11cf0994670bedb78efe22267", 1124576,
+ "demo2.exe", "ffe20c2dbb131b01fccc1211a41e76e7", 962560,
+ "Resource/Video/martha.mpg", "4dc93c37c0cdd75c01c58412f68e4874", 32499712),
+ Common::RU_RUS,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE | ADGF_DROPPLATFORM | ADGF_DEMO,
+ GUIO1(GUIO_NONE)
+ },
// ÐгенÑÑÑво "ÐоÑоÐеÑ": ÐÑÑÑов докÑоÑа ÐÑÑÑаÑди
// 2008/09/19 KD Vision Games
diff --git a/engines/qdengine/qdcore/qd_game_dispatcher.cpp b/engines/qdengine/qdcore/qd_game_dispatcher.cpp
index 3adaf14283f..0881ae00847 100644
--- a/engines/qdengine/qdcore/qd_game_dispatcher.cpp
+++ b/engines/qdengine/qdcore/qd_game_dispatcher.cpp
@@ -1899,6 +1899,11 @@ bool qdGameDispatcher::play_video(const char *vid_name) {
}
bool qdGameDispatcher::play_video(qdVideo *p) {
+ if (g_engine->getFeatures() & GF_BROKEN_VIDEOS) {
+ warning("Skipping broken video '%s'", p->file_name().toString().c_str());
+ return false;
+ }
+
if (!_video_player.open_file(find_file(p->file_name(), *p)))
return false;
diff --git a/engines/qdengine/qdengine.cpp b/engines/qdengine/qdengine.cpp
index 20ea930e532..70fa61b53c8 100644
--- a/engines/qdengine/qdengine.cpp
+++ b/engines/qdengine/qdengine.cpp
@@ -134,6 +134,12 @@ Common::Error QDEngineEngine::run() {
Common::String firstFileName;
Common::String script_name;
+
+ if (getFeatures() & GF_BROKEN_VIDEOS)
+ warning("YEEEEES");
+
+ warning("%s, %x", _gameDescription->filesDescriptions[0].md5, getFeatures());
+
if (p) {
firstFileName = p->getFileName();
script_name = firstFileName.c_str();
diff --git a/engines/qdengine/qdengine.h b/engines/qdengine/qdengine.h
index bb7d5418228..d37ef004715 100644
--- a/engines/qdengine/qdengine.h
+++ b/engines/qdengine/qdengine.h
@@ -59,6 +59,10 @@ enum QDEngineDebugChannels {
kDebugText,
};
+enum {
+ GF_BROKEN_VIDEOS = 1
+};
+
class QDEngineEngine : public Engine {
private:
const ADGameDescription *_gameDescription;
Commit: 53ccfaea30ed4e2be403d628d2d93443c481a6e7
https://github.com/scummvm/scummvm/commit/53ccfaea30ed4e2be403d628d2d93443c481a6e7
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-17T01:46:49+02:00
Commit Message:
QDENGINE: Fix warning
Changed paths:
engines/qdengine/qdcore/qd_sprite.cpp
diff --git a/engines/qdengine/qdcore/qd_sprite.cpp b/engines/qdengine/qdcore/qd_sprite.cpp
index 479731fc162..eb45aa5171a 100644
--- a/engines/qdengine/qdcore/qd_sprite.cpp
+++ b/engines/qdengine/qdcore/qd_sprite.cpp
@@ -267,7 +267,7 @@ bool qdSprite::load() {
_format = GR_ARGB8888;
break;
// otherwise the file format is incorrect
- default:
+ default:
warning("qdSprite::load(): Bad file format3: '%s'", transCyrillic(_file.toString()));
return false;
}
@@ -277,7 +277,7 @@ bool qdSprite::load() {
byte *dataPtr = _data;
for (int i = 0; i < height; i++) {
- byte *ptr = (byte *)tgaSurface->getBasePtr(0, i);
+ const byte *ptr = (const byte *)tgaSurface->getBasePtr(0, i);
memcpy(dataPtr, ptr, widthNB);
dataPtr += widthNB;
More information about the Scummvm-git-logs
mailing list