[Scummvm-cvs-logs] SF.net SVN: scummvm: [22112] scummvm/trunk/engines/scumm
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sun Apr 23 10:40:37 CEST 2006
Revision: 22112
Author: fingolfin
Date: 2006-04-23 10:39:31 -0700 (Sun, 23 Apr 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=22112&view=rev
Log Message:
-----------
Modified openFile and openResourceFile to take a Common::String instead of a char pointer
Modified Paths:
--------------
scummvm/trunk/engines/scumm/resource.cpp
scummvm/trunk/engines/scumm/scumm.h
scummvm/trunk/engines/scumm/smush/chunk.cpp
scummvm/trunk/engines/scumm/sound.cpp
Modified: scummvm/trunk/engines/scumm/resource.cpp
===================================================================
--- scummvm/trunk/engines/scumm/resource.cpp 2006-04-23 17:33:37 UTC (rev 22111)
+++ scummvm/trunk/engines/scumm/resource.cpp 2006-04-23 17:39:31 UTC (rev 22112)
@@ -115,7 +115,7 @@
VAR(VAR_CURRENTDISK) = diskNumber;
// Try to open the file
- result = openResourceFile(filename.c_str(), encByte);
+ result = openResourceFile(filename, encByte);
if (result) {
if (room == 0)
@@ -185,7 +185,7 @@
}
}
-bool ScummEngine::openFile(BaseScummFile &file, const char *filename, bool resourceFile) {
+bool ScummEngine::openFile(BaseScummFile &file, const Common::String &filename, bool resourceFile) {
bool result = false;
if (!_containerFile.empty()) {
@@ -204,8 +204,8 @@
return result;
}
-bool ScummEngine::openResourceFile(const char *filename, byte encByte) {
- debugC(DEBUG_GENERAL, "openResourceFile(%s)", filename);
+bool ScummEngine::openResourceFile(const Common::String &filename, byte encByte) {
+ debugC(DEBUG_GENERAL, "openResourceFile(%s)", filename.c_str());
if (openFile(*_fileHandle, filename, true)) {
_fileHandle->setEnc(encByte);
Modified: scummvm/trunk/engines/scumm/scumm.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm.h 2006-04-23 17:33:37 UTC (rev 22111)
+++ scummvm/trunk/engines/scumm/scumm.h 2006-04-23 17:39:31 UTC (rev 22112)
@@ -732,7 +732,7 @@
/** The name of the (macintosh/rescumm style) container file, if any. */
Common::String _containerFile;
- bool openFile(BaseScummFile &file, const char *filename, bool resourceFile = false); // TODO: Use Common::String
+ bool openFile(BaseScummFile &file, const Common::String &filename, bool resourceFile = false);
protected:
int _resourceHeaderSize;
@@ -748,7 +748,7 @@
void deleteRoomOffsets();
virtual void readRoomsOffsets();
void askForDisk(const char *filename, int disknum); // TODO: Use Common::String
- bool openResourceFile(const char *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);
virtual void readResTypeList(int id, const char *name);
Modified: scummvm/trunk/engines/scumm/smush/chunk.cpp
===================================================================
--- scummvm/trunk/engines/scumm/smush/chunk.cpp 2006-04-23 17:33:37 UTC (rev 22111)
+++ scummvm/trunk/engines/scumm/smush/chunk.cpp 2006-04-23 17:39:31 UTC (rev 22112)
@@ -101,7 +101,7 @@
FileChunk::FileChunk(const Common::String &name, int offset) {
_data = new ScummFile();
_deleteData = true;
- if (!g_scumm->openFile(*_data, name.c_str()))
+ if (!g_scumm->openFile(*_data, name))
error("FileChunk: Unable to open file %s", name.c_str());
_data->seek(offset, seek_start);
Modified: scummvm/trunk/engines/scumm/sound.cpp
===================================================================
--- scummvm/trunk/engines/scumm/sound.cpp 2006-04-23 17:33:37 UTC (rev 22111)
+++ scummvm/trunk/engines/scumm/sound.cpp 2006-04-23 17:39:31 UTC (rev 22112)
@@ -1018,7 +1018,7 @@
for (int i = 0; extensions[i].ext; ++i) {
Common::String tmp(basename[j]);
tmp += extensions[i].ext;
- if (_vm->openFile(*file, tmp.c_str())) {
+ if (_vm->openFile(*file, tmp)) {
_soundMode = extensions[i].mode;
break;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list