[Scummvm-git-logs] scummvm branch-2-2 -> 02c9bee43d73c33acd8d912d9bd5a772cbd7bc3c
criezy
criezy at scummvm.org
Sun Aug 30 20:53:23 UTC 2020
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
32b72af6f5 CINE: Fix OS EGA French Floppy detection #11617.
20dbaab535 CINE: Add OS German Atari ST detection (#11466).
d556b3efd8 CINE: Throttle safe controls to max 4Hz (#11621).
02c9bee43d CINE: Support 100 savegames also with original UI
Commit: 32b72af6f56dfbe372e5c8449f1b666ad712c8c5
https://github.com/scummvm/scummvm/commit/32b72af6f56dfbe372e5c8449f1b666ad712c8c5
Author: Kari Salminen (kari.salminen at gmail.com)
Date: 2020-08-30T21:53:17+01:00
Commit Message:
CINE: Fix OS EGA French Floppy detection #11617.
This fixes the Operation Stealth EGA French Floppy detection entry
from bug #11617. The file in question is PROCS1, not PROCS01.
Changed paths:
engines/cine/detection_tables.h
diff --git a/engines/cine/detection_tables.h b/engines/cine/detection_tables.h
index cfccd22bc6..e96c32d73b 100644
--- a/engines/cine/detection_tables.h
+++ b/engines/cine/detection_tables.h
@@ -374,11 +374,11 @@ static const CINEGameDescription gameDescriptions[] = {
0,
},
- { // Submitted by Kurufinwe21 in #11617
+ { // Submitted by Kurufinwe21 in #11617 (16 color French floppy version)
{
"os",
"",
- AD_ENTRY1s("procs01", "3f9edde60ccb380f716942c5b059d1d5", 14116),
+ AD_ENTRY1s("procs1", "3f9edde60ccb380f716942c5b059d1d5", 14116),
Common::FR_FRA,
Common::kPlatformDOS,
ADGF_TESTING,
Commit: 20dbaab53534149707cf0d893fb9da3e4f6e5b5d
https://github.com/scummvm/scummvm/commit/20dbaab53534149707cf0d893fb9da3e4f6e5b5d
Author: Kari Salminen (kari.salminen at gmail.com)
Date: 2020-08-30T21:53:17+01:00
Commit Message:
CINE: Add OS German Atari ST detection (#11466).
This adds detection entry for the Operation Stealth German Atari ST
version from bug #11466.
Changed paths:
engines/cine/detection_tables.h
diff --git a/engines/cine/detection_tables.h b/engines/cine/detection_tables.h
index e96c32d73b..69e61a0d2c 100644
--- a/engines/cine/detection_tables.h
+++ b/engines/cine/detection_tables.h
@@ -388,6 +388,20 @@ static const CINEGameDescription gameDescriptions[] = {
0,
},
+ { // Submitted by laenion in #11466 (German Atari ST version)
+ {
+ "os",
+ "",
+ AD_ENTRY1s("procs1", "b67af92a92ac5fd4add55893c15df76e", 63402),
+ Common::DE_DEU,
+ Common::kPlatformAtariST,
+ ADGF_TESTING,
+ GUIO0()
+ },
+ GType_OS,
+ 0,
+ },
+
{
{
"os",
Commit: d556b3efd89aa19c52e3136e74388c73a5302e50
https://github.com/scummvm/scummvm/commit/d556b3efd89aa19c52e3136e74388c73a5302e50
Author: Kari Salminen (kari.salminen at gmail.com)
Date: 2020-08-30T21:53:17+01:00
Commit Message:
CINE: Throttle safe controls to max 4Hz (#11621).
This throttles the safe controls in Operation Stealth in the
presidential palace after the first labyrinth arcade sequence.
The problem was that the safe controls were a bit too fast i.e. by
pressing on a single button you might easily get the numbers to change
by more than a single digit. This throttles the pressing of safe
control buttons in this particular scene to a maximum rate of 4Hz
(i.e. at least 250ms has to have passed before a click is registered
again).
Fixes bug #11621.
Changed paths:
engines/cine/cine.cpp
engines/cine/main_loop.cpp
engines/cine/various.cpp
engines/cine/various.h
diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp
index 6bd24bbfa6..cbbb77e7be 100644
--- a/engines/cine/cine.cpp
+++ b/engines/cine/cine.cpp
@@ -193,6 +193,8 @@ void CineEngine::initialize() {
reloadBgPalOnNextFlip = 0;
gfxFadeOutCompleted = 0;
gfxFadeInRequested = 0;
+ safeControlsLastAccessedMs = 0;
+ lastSafeControlObjIdx = -1;
currentDisk = 1;
collisionPage = new byte[320 * 200];
diff --git a/engines/cine/main_loop.cpp b/engines/cine/main_loop.cpp
index 862c80af09..a743ce2e0c 100644
--- a/engines/cine/main_loop.cpp
+++ b/engines/cine/main_loop.cpp
@@ -447,6 +447,8 @@ void CineEngine::mainLoop(int bootScriptIdx) {
forbidBgPalReload = 0;
gfxFadeOutCompleted = 0;
gfxFadeInRequested = 0;
+ safeControlsLastAccessedMs = 0;
+ lastSafeControlObjIdx = -1;
isDrawCommandEnabled = 0;
waitForPlayerClick = 0;
menuCommandLen = 0;
diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp
index a8eeece64f..ace913ca83 100644
--- a/engines/cine/various.cpp
+++ b/engines/cine/various.cpp
@@ -58,6 +58,8 @@ uint16 reloadBgPalOnNextFlip;
uint16 forbidBgPalReload;
uint16 gfxFadeOutCompleted;
uint16 gfxFadeInRequested;
+uint32 safeControlsLastAccessedMs;
+int16 lastSafeControlObjIdx;
int16 buildObjectListCommand(int16 param);
int16 canUseOnObject = 0;
@@ -169,6 +171,10 @@ void stopMusicAfterFadeOut() {
// }
}
+uint safeControlAccessMinMs() {
+ return 250;
+}
+
void runObjectScript(int16 entryIdx) {
ScriptPtr tmp(scriptInfo->create(*g_cine->_relTable[entryIdx], entryIdx));
assert(tmp);
@@ -1106,7 +1112,31 @@ void noPlayerCommandMouseLeft(uint16 &mouseX, uint16 &mouseY) {
relEntry = getRelEntryForObject(6, 1, ¤tSelectedObject);
if (relEntry != -1) {
- runObjectScript(relEntry);
+ bool skipSafeControlAccess = false;
+
+ // HACK: Throttle speed of otherwise overly sensitive safe controls (Bug #11621)
+ if (hacksEnabled && g_cine->getGameType() == Cine::GType_OS &&
+ scumm_stricmp(renderer->getBgName(), "COFFRE.PI1") == 0 &&
+ scumm_stricmp(currentPrcName, "PALAIS1.PRC") == 0) {
+ uint32 now = g_system->getMillis();
+
+ // Throttle access to the same safe control repeatedly in succession.
+ if (safeControlsLastAccessedMs != 0 &&
+ (now - safeControlsLastAccessedMs) < safeControlAccessMinMs() &&
+ objIdx == lastSafeControlObjIdx) {
+ skipSafeControlAccess = true;
+ warning("Skipping safe control access (Time since last called = %d ms < throttling value of %d ms)",
+ now - safeControlsLastAccessedMs, safeControlAccessMinMs());
+ } else {
+ safeControlsLastAccessedMs = now;
+ }
+
+ lastSafeControlObjIdx = objIdx;
+ }
+
+ if (!skipSafeControlAccess) {
+ runObjectScript(relEntry);
+ }
}
}
}
diff --git a/engines/cine/various.h b/engines/cine/various.h
index 45f091998e..b062476a4b 100644
--- a/engines/cine/various.h
+++ b/engines/cine/various.h
@@ -77,6 +77,8 @@ extern uint16 reloadBgPalOnNextFlip;
extern uint16 forbidBgPalReload;
extern uint16 gfxFadeOutCompleted;
extern uint16 gfxFadeInRequested;
+extern uint32 safeControlsLastAccessedMs; ///< Time in milliseconds when safe controls were last accessed.
+extern int16 lastSafeControlObjIdx; ///< Object index of the last safe control accessed.
extern int16 commandVar1;
extern int16 commandVar2;
extern int16 commandVar3[4];
Commit: 02c9bee43d73c33acd8d912d9bd5a772cbd7bc3c
https://github.com/scummvm/scummvm/commit/02c9bee43d73c33acd8d912d9bd5a772cbd7bc3c
Author: Kari Salminen (kari.salminen at gmail.com)
Date: 2020-08-30T21:53:17+01:00
Commit Message:
CINE: Support 100 savegames also with original UI
This raises the maximum number of savegames from 20 to 100.
The original UI could only show 20 on a screen at once so an
intermediate selection menu for selecting the group of 20 savegames
to be accessed is added in this commit:
0-19
20-39
40-59
60-79
80-99
Those are the values that are shown when selecting
"Restore game" or "Save game".
After selecting the group of savegames to be accessed that particular
group is only shown as those 20 can fit on the screen using the
original save/load UI.
At least partially if not fully fixes bug #11625.
Changed paths:
engines/cine/various.cpp
engines/cine/various.h
diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp
index ace913ca83..ac10c6af60 100644
--- a/engines/cine/various.cpp
+++ b/engines/cine/various.cpp
@@ -130,6 +130,7 @@ uint16 yMoveKeyb = kKeybMoveCenterY;
SelectedObjStruct currentSelectedObject;
CommandeType currentSaveName[kMaxSavegames];
+static const CommandeType saveChoices[] = {"0-19", "20-39", "40-59", "60-79", "80-99"};
static const int16 choiceResultTable[] = { 1, 1, 1, 2, 1, 1, 1 };
static const int16 subObjectUseTable[] = { 3, 3, 3, 3, 3, 0, 0 };
@@ -444,7 +445,18 @@ void CineEngine::makeSystemMenu() {
}
getMouseData(mouseUpdateStatus, (uint16 *)&mouseButton, (uint16 *)&mouseX, (uint16 *)&mouseY);
- selectedSave = makeMenuChoice(currentSaveName, kMaxSavegames, mouseX, mouseY + 8, 180);
+
+ // Choose savegame range first (0-19, 20-39, 40-59, 60-79, 80-99) and then save slot
+ int start = makeMenuChoice(saveChoices, ARRAYSIZE(saveChoices), mouseX, mouseY + 8, 9 * 5);
+ if (start >= 0) {
+ start *= kMaxOrigUiSavegames;
+ selectedSave = makeMenuChoice(¤tSaveName[start], kMaxOrigUiSavegames, mouseX, mouseY + 8, 180);
+ if (selectedSave >= 0) {
+ selectedSave += start;
+ }
+ } else {
+ selectedSave = -1;
+ }
if (selectedSave >= 0) {
getMouseData(mouseUpdateStatus, (uint16 *)&mouseButton, (uint16 *)&mouseX, (uint16 *)&mouseY);
@@ -481,7 +493,18 @@ void CineEngine::makeSystemMenu() {
return;
}
- selectedSave = makeMenuChoice(currentSaveName, kMaxSavegames, mouseX, mouseY + 8, 180, g_cine->getAutosaveSlot() + 1);
+ // Choose savegame range first (0-19, 20-39, 40-59, 60-79, 80-99) and then save slot
+ int start = makeMenuChoice(saveChoices, ARRAYSIZE(saveChoices), mouseX, mouseY + 8, 9 * 5);
+ if (start >= 0) {
+ start *= kMaxOrigUiSavegames;
+ int minY = ((start == 0) ? g_cine->getAutosaveSlot() + 1 : 0); // Don't allow saving over autosave slot
+ selectedSave = makeMenuChoice(¤tSaveName[start], kMaxOrigUiSavegames, mouseX, mouseY + 8, 180, minY);
+ if (selectedSave >= 0) {
+ selectedSave += start;
+ }
+ } else {
+ selectedSave = -1;
+ }
if (selectedSave >= 0) {
CommandeType saveName;
diff --git a/engines/cine/various.h b/engines/cine/various.h
index b062476a4b..ef1064efda 100644
--- a/engines/cine/various.h
+++ b/engines/cine/various.h
@@ -31,7 +31,8 @@
namespace Cine {
-#define kMaxSavegames 20 // 20 fit on screen using original save/load interface
+#define kMaxSavegames 100
+#define kMaxOrigUiSavegames 20 // 20 fit on screen using original save/load interface
// Maximum size of the command buffer including the trailing zero
#define kMaxCommandBufferSize 80
More information about the Scummvm-git-logs
mailing list