diff options
author | Max Horn | 2006-02-25 02:31:49 +0000 |
---|---|---|
committer | Max Horn | 2006-02-25 02:31:49 +0000 |
commit | ee0f0a1f13bf22c706097d8a0254e6f7392cb95b (patch) | |
tree | f90fe9e28caa0afcfa65b83a0b2954168286f920 | |
parent | 87fd6957acc6dd7c4b597b07685691adb2c95870 (diff) | |
download | scummvm-rg350-ee0f0a1f13bf22c706097d8a0254e6f7392cb95b.tar.gz scummvm-rg350-ee0f0a1f13bf22c706097d8a0254e6f7392cb95b.tar.bz2 scummvm-rg350-ee0f0a1f13bf22c706097d8a0254e6f7392cb95b.zip |
Replaced some more MKIDs by MKID_BE; this then enabled me to remove ScummEngine::fileReadDword()
svn-id: r20865
-rw-r--r-- | engines/scumm/resource.cpp | 40 | ||||
-rw-r--r-- | engines/scumm/scumm.cpp | 10 | ||||
-rw-r--r-- | engines/scumm/scumm.h | 2 |
3 files changed, 21 insertions, 31 deletions
diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp index fe41d6eed8..df2c9eb032 100644 --- a/engines/scumm/resource.cpp +++ b/engines/scumm/resource.cpp @@ -771,7 +771,7 @@ int ScummEngine::loadResource(int type, int idx) { return readSoundResource(type, idx); } - tag = fileReadDword(); + tag = _fileHandle->readUint32BE(); if (tag != res.tags[type] && _game.heversion < 70) { error("%s %d not in room %d at %d+%d in file %s", @@ -1353,28 +1353,28 @@ void ScummEngine::allocateArrays() { _storedFlObjects = (ObjectData *)calloc(100, sizeof(ObjectData)); } - allocResTypeData(rtCostume, (_game.features & GF_NEW_COSTUMES) ? MKID('AKOS') : MKID('COST'), + allocResTypeData(rtCostume, (_game.features & GF_NEW_COSTUMES) ? MKID_BE('AKOS') : MKID_BE('COST'), _numCostumes, "costume", 1); - allocResTypeData(rtRoom, MKID('ROOM'), _numRooms, "room", 1); - allocResTypeData(rtRoomImage, MKID('RMIM'), _numRooms, "room image", 1); - allocResTypeData(rtRoomScripts, MKID('RMSC'), _numRooms, "room script", 1); - allocResTypeData(rtSound, MKID('SOUN'), _numSounds, "sound", 2); - allocResTypeData(rtScript, MKID('SCRP'), _numScripts, "script", 1); - allocResTypeData(rtCharset, MKID('CHAR'), _numCharsets, "charset", 1); - allocResTypeData(rtObjectName, MKID('NONE'), _numNewNames, "new name", 0); - allocResTypeData(rtInventory, MKID('NONE'), _numInventory, "inventory", 0); - allocResTypeData(rtTemp, MKID('NONE'), 10, "temp", 0); - allocResTypeData(rtScaleTable, MKID('NONE'), 5, "scale table", 0); - allocResTypeData(rtActorName, MKID('NONE'), _numActors, "actor name", 0); - allocResTypeData(rtVerb, MKID('NONE'), _numVerbs, "verb", 0); - allocResTypeData(rtString, MKID('NONE'), _numArray, "array", 0); - allocResTypeData(rtFlObject, MKID('NONE'), _numFlObject, "flobject", 0); - allocResTypeData(rtMatrix, MKID('NONE'), 10, "boxes", 0); - allocResTypeData(rtImage, MKID('AWIZ'), _numImages, "images", 1); - allocResTypeData(rtTalkie, MKID('TLKE'), _numTalkies, "talkie", 1); + allocResTypeData(rtRoom, MKID_BE('ROOM'), _numRooms, "room", 1); + allocResTypeData(rtRoomImage, MKID_BE('RMIM'), _numRooms, "room image", 1); + allocResTypeData(rtRoomScripts, MKID_BE('RMSC'), _numRooms, "room script", 1); + allocResTypeData(rtSound, MKID_BE('SOUN'), _numSounds, "sound", 2); + allocResTypeData(rtScript, MKID_BE('SCRP'), _numScripts, "script", 1); + allocResTypeData(rtCharset, MKID_BE('CHAR'), _numCharsets, "charset", 1); + allocResTypeData(rtObjectName, 0, _numNewNames, "new name", 0); + allocResTypeData(rtInventory, 0, _numInventory, "inventory", 0); + allocResTypeData(rtTemp, 0, 10, "temp", 0); + allocResTypeData(rtScaleTable, 0, 5, "scale table", 0); + allocResTypeData(rtActorName, 0, _numActors, "actor name", 0); + allocResTypeData(rtVerb, 0, _numVerbs, "verb", 0); + allocResTypeData(rtString, 0, _numArray, "array", 0); + allocResTypeData(rtFlObject, 0, _numFlObject, "flobject", 0); + allocResTypeData(rtMatrix, 0, 10, "boxes", 0); + allocResTypeData(rtImage, MKID_BE('AWIZ'), _numImages, "images", 1); + allocResTypeData(rtTalkie, MKID_BE('TLKE'), _numTalkies, "talkie", 1); if (_game.heversion >= 70) { - allocResTypeData(rtSpoolBuffer, MKID('NONE'), 9, "spool buffer", 0); + allocResTypeData(rtSpoolBuffer, 0, 9, "spool buffer", 0); } } diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 5c393733cb..ad880d22f7 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1984,7 +1984,7 @@ int ScummEngine::init(GameDetector &detector) { requestLoad(ConfMan.getInt("save_slot")); } - allocResTypeData(rtBuffer, MKID('NONE'), 10, "buffer", 0); + allocResTypeData(rtBuffer, 0, 10, "buffer", 0); setupScummVars(); @@ -3029,14 +3029,6 @@ char ScummEngine::displayMessage(const char *altButton, const char *message, ... #pragma mark - -uint32 ScummEngine::fileReadDword() { -#if defined(SCUMM_LITTLE_ENDIAN) - return _fileHandle->readUint32LE(); -#elif defined(SCUMM_BIG_ENDIAN) - return _fileHandle->readUint32BE(); -#endif -} - void ScummEngine::errorString(const char *buf1, char *buf2) { if (_currentScript != 0xFF) { ScriptSlot *ss = &vm.slot[_currentScript]; diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h index 0a26d0689a..55df3d6f0a 100644 --- a/engines/scumm/scumm.h +++ b/engines/scumm/scumm.h @@ -1229,8 +1229,6 @@ public: protected: byte *_2byteFontPtr; - uint32 fileReadDword(); - public: /* Scumm Vars */ |