aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorAlyssa Milburn2011-08-22 20:03:05 +0200
committerAlyssa Milburn2011-08-22 20:03:05 +0200
commit84063dc9727a9f55e09d39574027beab695680e6 (patch)
treed71a9599cb550d9f7949a2d3209574064e054d85 /engines/sci/engine
parentc6e89df3d940747a85d447f172e2323c800f5eaf (diff)
parenta39a3eda46aea108a51556f001617ad28d29e520 (diff)
downloadscummvm-rg350-84063dc9727a9f55e09d39574027beab695680e6.tar.gz
scummvm-rg350-84063dc9727a9f55e09d39574027beab695680e6.tar.bz2
scummvm-rg350-84063dc9727a9f55e09d39574027beab695680e6.zip
Merge remote-tracking branch 'origin/master' into soltys_wip2
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/kstring.cpp5
-rw-r--r--engines/sci/engine/seg_manager.cpp6
-rw-r--r--engines/sci/engine/workarounds.cpp2
3 files changed, 5 insertions, 8 deletions
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index 7b8db22e3f..b383f88840 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -336,8 +336,9 @@ reg_t kFormat(EngineState *s, int argc, reg_t *argv) {
if (align >= 0)
while (str_leng-- > 1)
*target++ = ' '; /* Format into the text */
-
- *target++ = arguments[paramindex++];
+ char argchar = arguments[paramindex++];
+ if (argchar)
+ *target++ = argchar;
mode = 0;
}
break;
diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp
index ab67da32db..1510af8508 100644
--- a/engines/sci/engine/seg_manager.cpp
+++ b/engines/sci/engine/seg_manager.cpp
@@ -28,12 +28,6 @@
namespace Sci {
-enum {
- DEFAULT_SCRIPTS = 32,
- DEFAULT_OBJECTS = 8, ///< default number of objects per script
- DEFAULT_OBJECTS_INCREMENT = 4 ///< Number of additional objects to instantiate if we're running out of them
-};
-
SegManager::SegManager(ResourceManager *resMan) {
_heap.push_back(0);
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index e61da20f97..b2cde47f4a 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -283,6 +283,8 @@ const SciWorkaroundEntry kGraphSaveBox_workarounds[] = {
// gameID, room,script,lvl, object-name, method-name, call,index, workaround
const SciWorkaroundEntry kGraphRestoreBox_workarounds[] = {
+ { GID_LSL6, -1, 86, 0, "LL6Inv", "show", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // happens when restoring, is called with hunk segment, but hunk is not allocated at that time
+ // ^^ TODO: check, if this is really a script error or an issue with our restore code
{ GID_LSL6, -1, 86, 0, "LL6Inv", "hide", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // happens during the game, gets called with 1 extra parameter
{ GID_SQ5, 850, 850, 0, NULL, "changeState", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // happens while playing Battle Cruiser (invalid segment) - bug #3056811
SCI_WORKAROUNDENTRY_TERMINATOR