[Scummvm-git-logs] scummvm master -> a7da05894048e894d4c9354ad440e4fe7657bfe0
sdelamarre
noreply at scummvm.org
Tue Oct 24 21:16:14 UTC 2023
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:
446e2a96a8 GOB: Fix formatting of some lengthy "if" clauses
a7da058940 GOB: Allow to skip the "bird table" animation in Adibou2 hollow tree
Commit: 446e2a96a87984f338519e988c30be72283be923
https://github.com/scummvm/scummvm/commit/446e2a96a87984f338519e988c30be72283be923
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2023-10-24T23:15:36+02:00
Commit Message:
GOB: Fix formatting of some lengthy "if" clauses
Changed paths:
engines/gob/inter_v6.cpp
diff --git a/engines/gob/inter_v6.cpp b/engines/gob/inter_v6.cpp
index 3629ffb3a95..549f2addc80 100644
--- a/engines/gob/inter_v6.cpp
+++ b/engines/gob/inter_v6.cpp
@@ -300,18 +300,11 @@ void Inter_v6::o6_assign(OpFuncParams ¶ms) {
// WORKAROUND for a bug in Adibou 2 scripts for cooking activity: bananas count is not updated correctly.
// The banana balance equation should be: "remaining bananas = previous remaining bananas - bananas used for cake"
// but scripts do instead "remaining bananas = previous remaining *cherries* - bananas used for cake" :p
- if (_vm->getGameType() == kGameTypeAdibou2
- &&
- loopCount == 1
- &&
- _vm->_enableAdibou2FreeBananasWorkaround
- &&
- _vm->_game->_script->pos() == 18631 // same offset in all versions
- &&
- (dest == 40956 // bananas in v2.10, v2.11
- ||
- dest == 40916) // bananas in v2.12, v2.13
- &&
+ if (_vm->getGameType() == kGameTypeAdibou2 &&
+ loopCount == 1 &&
+ _vm->_enableAdibou2FreeBananasWorkaround &&
+ _vm->_game->_script->pos() == 18631 && // same offset in all versions
+ (dest == 40956 || dest == 40916) && // bananas in v2.10, v2.11 / v2.12, v2.13
_vm->isCurrentTot("cuisine.tot")) {
uint16 bananasInCakesVar = (dest == 40956) ? 22820 : 22828;
WRITE_VAR_OFFSET(dest, VAR_OFFSET(dest) - VAR_OFFSET(bananasInCakesVar) /* bananas used for cake */);
@@ -357,16 +350,11 @@ void Inter_v6::o6_assign(OpFuncParams ¶ms) {
}
// WORKAROUND for a bug in Adibou2 script of "pleasant/unpleasant" game
- if (_vm->getGameType() == kGameTypeAdibou2
- &&
- loopCount == 1
- &&
- _vm->_game->_script->pos() == 6739
- &&
- dest == 508
- &&
- VAR_OFFSET(dest) == 0
- &&
+ if (_vm->getGameType() == kGameTypeAdibou2 &&
+ loopCount == 1 &&
+ _vm->_game->_script->pos() == 6739 &&
+ dest == 508 &&
+ VAR_OFFSET(dest) == 0 &&
_vm->isCurrentTot("l6ex11.tot")) {
WRITE_VAR_OFFSET(dest, 1); // used as a loop index for an array initialized only from index 1, skip value 0
}
Commit: a7da05894048e894d4c9354ad440e4fe7657bfe0
https://github.com/scummvm/scummvm/commit/a7da05894048e894d4c9354ad440e4fe7657bfe0
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2023-10-24T23:15:36+02:00
Commit Message:
GOB: Allow to skip the "bird table" animation in Adibou2 hollow tree
This animation is CPU-bounded in the original, making it run too fast on recent machines.
In our implementation, however, there are some sleep() calls on the way making it run
slightly too slow, so we make it skippable as a workaround.
Changed paths:
engines/gob/inter_v6.cpp
diff --git a/engines/gob/inter_v6.cpp b/engines/gob/inter_v6.cpp
index 549f2addc80..e0735a0d556 100644
--- a/engines/gob/inter_v6.cpp
+++ b/engines/gob/inter_v6.cpp
@@ -312,6 +312,19 @@ void Inter_v6::o6_assign(OpFuncParams ¶ms) {
return;
}
+ // WORKAROUND: Make the "bird table" animation in the hollow tree skippable with right click
+ if (_vm->getGameType() == kGameTypeAdibou2 &&
+ loopCount == 1 &&
+ (dest == 19104 || dest == 19400 || dest == 19404) && // animation "frame" in different versions
+ _vm->_game->_script->pos() > 9036 &&
+ _vm->_game->_script->pos() < 9478 &&
+ _vm->isCurrentTot("atelier.tot") &&
+ VAR(4) == kMouseButtonsRight) {
+ WRITE_VAR_OFFSET(dest, 200);
+ _vm->_game->_script->skipExpr(99);
+ return;
+ }
+
for (int i = 0; i < loopCount; i++) {
int16 result;
int16 srcType = _vm->_game->_script->evalExpr(&result);
More information about the Scummvm-git-logs
mailing list