mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-07 10:48:43 +00:00
Add workaround for script bug in Loom (CD)
svn-id: r21371
This commit is contained in:
parent
cbf3c06c1d
commit
79bd731041
@ -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);
|
||||
|
@ -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 */
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user