From 5532f83a56e23d9fcb46bedd9c326be2d7684fcd Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Tue, 7 Sep 2004 13:23:26 +0000 Subject: [PATCH] Load talkie block svn-id: r14945 --- scumm/resource.cpp | 9 ++++++--- scumm/scumm.cpp | 1 + scumm/scumm.h | 6 ++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/scumm/resource.cpp b/scumm/resource.cpp index 59fe69779c4..15577cbc15b 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -573,8 +573,7 @@ void ScummEngine::readIndexFile() { break; case MKID('DIRT'): - _fileHandle.seek(itemsize - 8, SEEK_CUR); - warning("DIRT index block not yet handled, skipping"); + readResTypeList(rtTalkie, MKID('TLKE'), "talkie"); break; case MKID('SVER'): @@ -2321,7 +2320,7 @@ void ScummEngine::readMAXS(int blockSize) { _fileHandle.readUint16LE(); // unknown _fileHandle.readUint16LE(); // unknown _fileHandle.readUint16LE(); // unknown - _fileHandle.readUint16LE(); // _numTalkie + _numTalkie = _fileHandle.readUint16LE(); /* TODO check these values */ @@ -2491,6 +2490,8 @@ void ScummEngine::allocateArrays() { allocResTypeData(rtMatrix, MKID('NONE'), 10, "boxes", 0); allocResTypeData(rtImage, MKID('AWIZ'), _numImages, "images", 1); allocResTypeData(rtRoomImage, MKID('RMIM'), _numRooms, "room image", 1); + allocResTypeData(rtTalkie, MKID('TLKE'), _numTalkie, "talkie", 1); + } void ScummEngine::dumpResource(const char *tag, int idx, const byte *ptr, int length) { @@ -2718,6 +2719,8 @@ const char *resTypeFromId(int id) { return "RoomImage"; case rtImage: return "Image"; + case rtTalkie: + return "Talkie"; case rtNumTypes: return "NumTypes"; default: diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index d75f3d24674..eba8e86f47d 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -520,6 +520,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS _numActors = 0; _numCostumes = 0; _numImages = 0; + _numTalkie = 0; _audioNames = NULL; _numAudioNames = 0; _curActor = 0; diff --git a/scumm/scumm.h b/scumm/scumm.h index 7030e1fb360..44dcb080490 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -214,8 +214,9 @@ enum ResTypes { rtRoomScripts = 17, rtRoomImage = 18, rtImage = 19, - rtLast = 19, - rtNumTypes = 20 + rtTalkie = 20, + rtLast = 20, + rtNumTypes = 21 }; enum { @@ -480,6 +481,7 @@ protected: int _numInventory; int _numNewNames, _numGlobalScripts; int _numActors, _numRoomVariables; + int _numTalkie; public: int _numImages, _numRooms, _numScripts, _numSounds; // Used by VARS in HE games int _numCostumes; // FIXME - should be protected, used by Actor::remapActorPalette