[Scummvm-git-logs] scummvm master -> c7bb8a3a271b504cc46529474f67e38979dbb6ba
tag2015
noreply at scummvm.org
Sun May 5 12:25:54 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:
824e7507aa AGS: Add check for unsupported videos in Earl Mansin
c7bb8a3a27 AGS: Engine: hack for pre-2.70 games to ignore RestartGame before NewRoom
Commit: 824e7507aa9b0f8cf72562cf40e4f799f09285d0
https://github.com/scummvm/scummvm/commit/824e7507aa9b0f8cf72562cf40e4f799f09285d0
Author: Walter Agazzi (walter.agazzi at protonmail.com)
Date: 2024-05-05T14:24:26+02:00
Commit Message:
AGS: Add check for unsupported videos in Earl Mansin
Changed paths:
engines/ags/engine/ac/global_video.cpp
diff --git a/engines/ags/engine/ac/global_video.cpp b/engines/ags/engine/ac/global_video.cpp
index cac187f02f5..0289f0892b1 100644
--- a/engines/ags/engine/ac/global_video.cpp
+++ b/engines/ags/engine/ac/global_video.cpp
@@ -156,7 +156,7 @@ void pause_sound_if_necessary_and_play_video(const char *name, int flags, VideoS
if (strlen(filename) > 3) {
char *file_ext = &(filename[strlen(filename) - 3]);
- if ((ags_stricmp(file_ext, "wmv") == 0) || (ags_stricmp(file_ext, "wfl") == 0)) {
+ if ((ags_stricmp(file_ext, "wmv") == 0) || (ags_stricmp(file_ext, "wfl") == 0) || (ags_stricmp(file_ext, "cfg") == 0)) {
// WMV is not supported, so let's look for reencoded videos
debug("Attempt to load unsupported WMV file - will look for reencoded equivalents");
strncpy(file_ext, "ogv", 4);
Commit: c7bb8a3a271b504cc46529474f67e38979dbb6ba
https://github.com/scummvm/scummvm/commit/c7bb8a3a271b504cc46529474f67e38979dbb6ba
Author: Walter Agazzi (walter.agazzi at protonmail.com)
Date: 2024-05-05T14:24:26+02:00
Commit Message:
AGS: Engine: hack for pre-2.70 games to ignore RestartGame before NewRoom
Reimplemented from upstream 0711b6fdc0f1c71c341716a20de0d90a75f1ec92
Changed paths:
engines/ags/engine/script/executing_script.cpp
diff --git a/engines/ags/engine/script/executing_script.cpp b/engines/ags/engine/script/executing_script.cpp
index 6b0983ad47c..72d9f4a7298 100644
--- a/engines/ags/engine/script/executing_script.cpp
+++ b/engines/ags/engine/script/executing_script.cpp
@@ -19,10 +19,12 @@
*
*/
+#include "ags/globals.h"
#include "ags/engine/script/executing_script.h"
#include "ags/engine/debugging/debug_log.h"
#include "ags/engine/debugging/debugger.h"
#include "ags/engine/script/script.h"
+#include "ags/shared/ac/game_version.h"
namespace AGS3 {
@@ -35,6 +37,25 @@ int ExecutingScript::queue_action(PostScriptAction act, int data, const char *an
if (numPostScriptActions >= MAX_QUEUED_ACTIONS)
quitprintf("!%s: Cannot queue action, post-script queue full", aname);
+ // A strange behavior in pre-2.7.0 games allowed to call NewRoom right after
+ // RestartGame, cancelling RestartGame. Probably an unintended effect.
+ // We try to emulate this here, by simply removing all ePSARestartGame.
+ if ((_G(loaded_game_file_version) < kGameVersion_270) && (act == ePSANewRoom)) {
+ for (int i = 0; i < numPostScriptActions; i++) {
+ if (postScriptActions[i] == ePSARestartGame) {
+ debug("Removing spurious RestartGame event! index = %d numPostScriptActions = %d", i, numPostScriptActions);
+ for (int j = i; j < numPostScriptActions; j++) {
+ postScriptActions[j] = postScriptActions[j + 1];
+ postScriptActionData[j] = postScriptActionData[j + 1];
+ postScriptActionNames[j] = postScriptActionNames[j + 1];
+ postScriptActionPositions[j] = postScriptActionPositions[j + 1];
+ }
+ i--; // make sure to remove multiple ePSARestartGame
+ numPostScriptActions--;
+ }
+ }
+ }
+
if (numPostScriptActions > 0) {
// if something that will terminate the room has already
// been queued, don't allow a second thing to be queued
More information about the Scummvm-git-logs
mailing list