aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/intern.h2
-rw-r--r--engines/scumm/script_v5.cpp9
-rw-r--r--engines/scumm/scumm.cpp12
3 files changed, 16 insertions, 7 deletions
diff --git a/engines/scumm/intern.h b/engines/scumm/intern.h
index cd666c1049..3d2c540744 100644
--- a/engines/scumm/intern.h
+++ b/engines/scumm/intern.h
@@ -195,6 +195,8 @@ class ScummEngine_v4 : public ScummEngine_v5 {
public:
ScummEngine_v4(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
+ virtual void scummInit();
+
protected:
virtual void readIndexFile();
virtual void loadCharset(int no);
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index ccd4b1def3..c89830e625 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -2306,12 +2306,9 @@ void ScummEngine_v5::o5_stringOps() {
b = getVarOrDirectByte(PARAM_2);
c = getVarOrDirectByte(PARAM_3);
ptr = getResourceAddress(rtString, a);
- if (!(_game.id == GID_LOOM && _game.version == 4)) { /* FIXME - LOOM256 */
- if (ptr == NULL)
- error("String %d does not exist", a);
- ptr[b] = c;
- }
-
+ if (ptr == NULL)
+ error("String %d does not exist", a);
+ ptr[b] = c;
break;
case 4: /* get string char */
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 2eda01e089..f55af75b2e 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1543,6 +1543,17 @@ void ScummEngine_v2::scummInit() {
_inventoryOffset = 0;
}
+void ScummEngine_v4::scummInit() {
+ ScummEngine::scummInit();
+
+ // WORKAROUND for bug in boot script of Loom (CD)
+ // The boot script sets the characters of string 21,
+ // before creating the string.resource.
+ if (_game.id == GID_LOOM) {
+ res.createResource(rtString, 21, 12);
+ }
+}
+
void ScummEngine_v6::scummInit() {
ScummEngine::scummInit();
setDefaultCursor();
@@ -1623,7 +1634,6 @@ void ScummEngine_v99he::scummInit() {
int len = resStrLen(basename);
ArrayHeader *ah = defineArray(129, kStringArray, 0, 0, 0, len);
memcpy(ah->data, basename, len);
-
}
#endif