allocate memory for dobj in he 90, point games claiming to be 90 at 72he class

svn-id: r14777
This commit is contained in:
Jonathan Gray 2004-08-26 14:07:19 +00:00
parent 35a0c52f42
commit 3d8ef64d39
2 changed files with 14 additions and 3 deletions

View File

@ -527,12 +527,11 @@ void ScummEngine::readIndexFile() {
_fileHandle.read(_objectStateTable, num);
_fileHandle.read(_objectRoomTable, num);
memset(_objectOwnerTable, 0xFF, num);
} else if (_heversion >= 90) { // newer windows titles
error("DOBJ reading not yet supported for Scummsys >= 90");
} else if (_heversion >= 70) { // older Windows titles
} else if (_heversion >= 70) { // HE Windows titles
_fileHandle.read(_objectStateTable, num);
_fileHandle.read(_objectOwnerTable, num);
_fileHandle.read(_objectRoomTable, num);
// FIXME more DOBJ bits left to sort out here
} else {
_fileHandle.read(_objectOwnerTable, num);
for (i = 0; i < num; i++) {
@ -2310,6 +2309,17 @@ void ScummEngine::readMAXS(int blockSize) {
_fileHandle.readUint16LE(); // unknown
_fileHandle.readUint16LE(); // _numLocalScripts?
_fileHandle.readUint16LE(); // unknown
/* TODO check these values */
_objectRoomTable = (byte *)calloc(_numGlobalObjects, 1);
_numNewNames = 10;
_objectRoomTable = (byte *)calloc(_numGlobalObjects * 4, 1);
_numGlobalScripts = 200;
_shadowPaletteSize = 256;
} else if (_heversion >= 70 && (blockSize == 44 + 8)) { // C++ based engine
error("MAXS blocks from C++ based games not yet supported");
} else if (_heversion >= 70 && blockSize > 38) { // sputm7.2

View File

@ -3273,6 +3273,7 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) {
switch (game.heversion) {
#ifndef __PALM_OS__
case 72:
case 90:
engine = new ScummEngine_v72he(detector, syst, game);
break;
case 71: