Ticket #2716: indy3towns.diff

File indy3towns.diff, 1.5 KB (added by Kirben, 18 years ago)

Patch to fix problem

  • engines/scumm/resource_v4.cpp

     
    4747                if (_fileHandle->ioFailed())
    4848                        break;
    4949
     50                printf("File pos %d ID %c%c\n", _fileHandle->pos(), blocktype & 0xFF, blocktype >> 8);
    5051                switch (blocktype) {
    5152                case 0x4E52:    // 'NR'
    5253                        _fileHandle->readUint16LE();
     
    6566                        break;
    6667                case 0x4F30:    // 'O0'
    6768                        _numGlobalObjects = _fileHandle->readUint16LE();
     69
     70                        if (_game.id == GID_INDY3 && _game.platform == Common::kPlatformFMTowns)
     71                                itemsize += 32;
    6872                        break;
    6973                }
    7074                _fileHandle->seek(itemsize - 8, SEEK_CUR);
     
    121125                        break;
    122126
    123127                default:
    124                         // FIXME: this is a little hack because Indy3 FM-TOWNS has
    125                         // 32 extra bytes of unknown meaning appended to 00.LFL
    126                         if (!(_game.id == GID_INDY3 && _game.platform == Common::kPlatformFMTowns))
    127                                 error("Bad ID %c%c found in directory!", blocktype & 0xFF, blocktype >> 8);
    128                         return;
     128                        error("Bad ID %c%c found in directory!", blocktype & 0xFF, blocktype >> 8);
    129129                }
    130130        }
    131131        closeRoom();
     
    188188                _objectOwnerTable[i] = tmp & OF_OWNER_MASK;
    189189                _objectStateTable[i] = tmp >> OF_STATE_SHL;
    190190        }
     191
     192        // FIXME: Indy3 FM-TOWNS has 32 extra bytes of unknown meaning
     193        // appended to 00.LFL
     194        if (_game.id == GID_INDY3 && _game.platform == Common::kPlatformFMTowns)
     195                _fileHandle->seek(32, SEEK_CUR);
    191196}
    192197
    193198