Removed the (useless, thanks to resTypeFromId) 'name' parameter from readResTypeList
svn-id: r25828
This commit is contained in:
parent
04a18dd7c4
commit
8fa6a1ffd5
6 changed files with 34 additions and 34 deletions
|
@ -214,7 +214,7 @@ public:
|
||||||
virtual void resetScumm();
|
virtual void resetScumm();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void readResTypeList(int id, const char *name);
|
virtual void readResTypeList(int id);
|
||||||
virtual void readIndexFile();
|
virtual void readIndexFile();
|
||||||
virtual void loadCharset(int no);
|
virtual void loadCharset(int no);
|
||||||
virtual void resetRoomObjects();
|
virtual void resetRoomObjects();
|
||||||
|
@ -246,7 +246,7 @@ public:
|
||||||
ScummEngine_v3old(OSystem *syst, const DetectorResult &dr);
|
ScummEngine_v3old(OSystem *syst, const DetectorResult &dr);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void readResTypeList(int id, const char *name);
|
virtual void readResTypeList(int id);
|
||||||
virtual void readIndexFile();
|
virtual void readIndexFile();
|
||||||
virtual void setupRoomSubBlocks();
|
virtual void setupRoomSubBlocks();
|
||||||
virtual void resetRoomSubBlocks();
|
virtual void resetRoomSubBlocks();
|
||||||
|
|
|
@ -367,7 +367,7 @@ void ScummEngine_v7::readIndexBlock(uint32 blocktype, uint32 itemsize) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MKID_BE('DRSC'): // Used by: COMI
|
case MKID_BE('DRSC'): // Used by: COMI
|
||||||
readResTypeList(rtRoomScripts, "room script");
|
readResTypeList(rtRoomScripts);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -381,15 +381,15 @@ void ScummEngine_v70he::readIndexBlock(uint32 blocktype, uint32 itemsize) {
|
||||||
int i;
|
int i;
|
||||||
switch (blocktype) {
|
switch (blocktype) {
|
||||||
case MKID_BE('DIRI'):
|
case MKID_BE('DIRI'):
|
||||||
readResTypeList(rtRoomImage, "room image");
|
readResTypeList(rtRoomImage);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MKID_BE('DIRM'):
|
case MKID_BE('DIRM'):
|
||||||
readResTypeList(rtImage, "images");
|
readResTypeList(rtImage);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MKID_BE('DIRT'):
|
case MKID_BE('DIRT'):
|
||||||
readResTypeList(rtTalkie, "talkie");
|
readResTypeList(rtTalkie);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MKID_BE('DLFL'):
|
case MKID_BE('DLFL'):
|
||||||
|
@ -426,7 +426,7 @@ void ScummEngine::readIndexBlock(uint32 blocktype, uint32 itemsize) {
|
||||||
switch (blocktype) {
|
switch (blocktype) {
|
||||||
case MKID_BE('DCHR'):
|
case MKID_BE('DCHR'):
|
||||||
case MKID_BE('DIRF'):
|
case MKID_BE('DIRF'):
|
||||||
readResTypeList(rtCharset, "charset");
|
readResTypeList(rtCharset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MKID_BE('DOBJ'):
|
case MKID_BE('DOBJ'):
|
||||||
|
@ -460,17 +460,17 @@ void ScummEngine::readIndexBlock(uint32 blocktype, uint32 itemsize) {
|
||||||
|
|
||||||
case MKID_BE('DROO'):
|
case MKID_BE('DROO'):
|
||||||
case MKID_BE('DIRR'):
|
case MKID_BE('DIRR'):
|
||||||
readResTypeList(rtRoom, "room");
|
readResTypeList(rtRoom);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MKID_BE('DSCR'):
|
case MKID_BE('DSCR'):
|
||||||
case MKID_BE('DIRS'):
|
case MKID_BE('DIRS'):
|
||||||
readResTypeList(rtScript, "script");
|
readResTypeList(rtScript);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MKID_BE('DCOS'):
|
case MKID_BE('DCOS'):
|
||||||
case MKID_BE('DIRC'):
|
case MKID_BE('DIRC'):
|
||||||
readResTypeList(rtCostume, "costume");
|
readResTypeList(rtCostume);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MKID_BE('MAXS'):
|
case MKID_BE('MAXS'):
|
||||||
|
@ -480,7 +480,7 @@ void ScummEngine::readIndexBlock(uint32 blocktype, uint32 itemsize) {
|
||||||
|
|
||||||
case MKID_BE('DIRN'):
|
case MKID_BE('DIRN'):
|
||||||
case MKID_BE('DSOU'):
|
case MKID_BE('DSOU'):
|
||||||
readResTypeList(rtSound, "sound");
|
readResTypeList(rtSound);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MKID_BE('AARY'):
|
case MKID_BE('AARY'):
|
||||||
|
@ -497,11 +497,11 @@ void ScummEngine::readArrayFromIndexFile() {
|
||||||
error("readArrayFromIndexFile() not supported in pre-V6 games");
|
error("readArrayFromIndexFile() not supported in pre-V6 games");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScummEngine::readResTypeList(int id, const char *name) {
|
void ScummEngine::readResTypeList(int id) {
|
||||||
int num;
|
int num;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
debug(9, "readResTypeList(%s,%s)", resTypeFromId(id), name);
|
debug(9, "readResTypeList(%s)", resTypeFromId(id));
|
||||||
|
|
||||||
if (_game.version == 8)
|
if (_game.version == 8)
|
||||||
num = _fileHandle->readUint32LE();
|
num = _fileHandle->readUint32LE();
|
||||||
|
@ -509,7 +509,7 @@ void ScummEngine::readResTypeList(int id, const char *name) {
|
||||||
num = _fileHandle->readUint16LE();
|
num = _fileHandle->readUint16LE();
|
||||||
|
|
||||||
if (num != _res->num[id]) {
|
if (num != _res->num[id]) {
|
||||||
error("Invalid number of %ss (%d) in directory", name, num);
|
error("Invalid number of %ss (%d) in directory", resTypeFromId(id), num);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < num; i++) {
|
for (i = 0; i < num; i++) {
|
||||||
|
@ -626,7 +626,7 @@ int ScummEngine::loadResource(int type, int idx) {
|
||||||
uint32 fileOffs;
|
uint32 fileOffs;
|
||||||
uint32 size, tag;
|
uint32 size, tag;
|
||||||
|
|
||||||
debugC(DEBUG_RESOURCE, "loadResource(%s,%d)", resTypeFromId(type),idx);
|
debugC(DEBUG_RESOURCE, "loadResource(%s,%d)", resTypeFromId(type), idx);
|
||||||
|
|
||||||
if (type == rtCharset && (_game.features & GF_SMALL_HEADER)) {
|
if (type == rtCharset && (_game.features & GF_SMALL_HEADER)) {
|
||||||
loadCharset(idx);
|
loadCharset(idx);
|
||||||
|
|
|
@ -144,10 +144,10 @@ void ScummEngine_v2::readEnhancedIndexFile() {
|
||||||
|
|
||||||
_fileHandle->readUint16LE(); /* version magic number */
|
_fileHandle->readUint16LE(); /* version magic number */
|
||||||
readGlobalObjects();
|
readGlobalObjects();
|
||||||
readResTypeList(rtRoom, "room");
|
readResTypeList(rtRoom);
|
||||||
readResTypeList(rtCostume, "costume");
|
readResTypeList(rtCostume);
|
||||||
readResTypeList(rtScript, "script");
|
readResTypeList(rtScript);
|
||||||
readResTypeList(rtSound, "sound");
|
readResTypeList(rtSound);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScummEngine_v2::readGlobalObjects() {
|
void ScummEngine_v2::readGlobalObjects() {
|
||||||
|
|
|
@ -31,16 +31,16 @@ namespace Scumm {
|
||||||
|
|
||||||
extern const char *resTypeFromId(int id);
|
extern const char *resTypeFromId(int id);
|
||||||
|
|
||||||
void ScummEngine_v3old::readResTypeList(int id, const char *name) {
|
void ScummEngine_v3old::readResTypeList(int id) {
|
||||||
int num;
|
int num;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
debug(9, "readResTypeList(%s,%s)", resTypeFromId(id), name);
|
debug(9, "readResTypeList(%s)", resTypeFromId(id));
|
||||||
|
|
||||||
num = _fileHandle->readByte();
|
num = _fileHandle->readByte();
|
||||||
|
|
||||||
if (num >= 0xFF) {
|
if (num >= 0xFF) {
|
||||||
error("Too many %ss (%d) in directory", name, num);
|
error("Too many %ss (%d) in directory", resTypeFromId(id), num);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (id == rtRoom) {
|
if (id == rtRoom) {
|
||||||
|
@ -87,10 +87,10 @@ void ScummEngine_v3old::readIndexFile() {
|
||||||
|
|
||||||
_fileHandle->readUint16LE(); /* version magic number */
|
_fileHandle->readUint16LE(); /* version magic number */
|
||||||
readGlobalObjects();
|
readGlobalObjects();
|
||||||
readResTypeList(rtRoom, "room");
|
readResTypeList(rtRoom);
|
||||||
readResTypeList(rtCostume, "costume");
|
readResTypeList(rtCostume);
|
||||||
readResTypeList(rtScript, "script");
|
readResTypeList(rtScript);
|
||||||
readResTypeList(rtSound, "sound");
|
readResTypeList(rtSound);
|
||||||
|
|
||||||
closeRoom();
|
closeRoom();
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,16 +32,16 @@ namespace Scumm {
|
||||||
|
|
||||||
extern const char *resTypeFromId(int id);
|
extern const char *resTypeFromId(int id);
|
||||||
|
|
||||||
void ScummEngine_v4::readResTypeList(int id, const char *name) {
|
void ScummEngine_v4::readResTypeList(int id) {
|
||||||
int num;
|
int num;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
debug(9, "readResTypeList(%s,%s)", resTypeFromId(id), name);
|
debug(9, "readResTypeList(%s)", resTypeFromId(id));
|
||||||
|
|
||||||
num = _fileHandle->readUint16LE();
|
num = _fileHandle->readUint16LE();
|
||||||
|
|
||||||
if (num != _res->num[id]) {
|
if (num != _res->num[id]) {
|
||||||
error("Invalid number of %ss (%d) in directory", name, num);
|
error("Invalid number of %ss (%d) in directory", resTypeFromId(id), num);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < num; i++) {
|
for (i = 0; i < num; i++) {
|
||||||
|
@ -125,19 +125,19 @@ void ScummEngine_v4::readIndexFile() {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x5230: // 'R0'
|
case 0x5230: // 'R0'
|
||||||
readResTypeList(rtRoom, "room");
|
readResTypeList(rtRoom);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x5330: // 'S0'
|
case 0x5330: // 'S0'
|
||||||
readResTypeList(rtScript, "script");
|
readResTypeList(rtScript);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x4E30: // 'N0'
|
case 0x4E30: // 'N0'
|
||||||
readResTypeList(rtSound, "sound");
|
readResTypeList(rtSound);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x4330: // 'C0'
|
case 0x4330: // 'C0'
|
||||||
readResTypeList(rtCostume, "costume");
|
readResTypeList(rtCostume);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x4F30: // 'O0'
|
case 0x4F30: // 'O0'
|
||||||
|
|
|
@ -737,7 +737,7 @@ protected:
|
||||||
bool openResourceFile(const Common::String &filename, byte encByte); // TODO: Use Common::String
|
bool openResourceFile(const Common::String &filename, byte encByte); // TODO: Use Common::String
|
||||||
|
|
||||||
void loadPtrToResource(int type, int i, const byte *ptr);
|
void loadPtrToResource(int type, int i, const byte *ptr);
|
||||||
virtual void readResTypeList(int id, const char *name);
|
virtual void readResTypeList(int id);
|
||||||
// void allocResTypeData(int id, uint32 tag, int num, const char *name, int mode);
|
// void allocResTypeData(int id, uint32 tag, int num, const char *name, int mode);
|
||||||
// byte *createResource(int type, int index, uint32 size);
|
// byte *createResource(int type, int index, uint32 size);
|
||||||
int loadResource(int type, int i);
|
int loadResource(int type, int i);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue