aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/totfile.cpp
diff options
context:
space:
mode:
authorSven Hesse2009-06-23 23:55:35 +0000
committerSven Hesse2009-06-23 23:55:35 +0000
commit82f1ebcafed7e565ac4dce610f7bc098f45ee67d (patch)
treee90eb9b36ffdc1f699bafb3b52bf2793892f16f1 /engines/gob/totfile.cpp
parent04d4ce4a8be24bde70933c7e4a1dc41f374a75ad (diff)
downloadscummvm-rg350-82f1ebcafed7e565ac4dce610f7bc098f45ee67d.tar.gz
scummvm-rg350-82f1ebcafed7e565ac4dce610f7bc098f45ee67d.tar.bz2
scummvm-rg350-82f1ebcafed7e565ac4dce610f7bc098f45ee67d.zip
Putting TOT filename generation and LOM checking into TOTFile
svn-id: r41822
Diffstat (limited to 'engines/gob/totfile.cpp')
-rw-r--r--engines/gob/totfile.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/engines/gob/totfile.cpp b/engines/gob/totfile.cpp
index b8882ba588..46d422d44d 100644
--- a/engines/gob/totfile.cpp
+++ b/engines/gob/totfile.cpp
@@ -98,4 +98,20 @@ bool TOTFile::getProperties(Properties &props) const {
return true;
}
+Common::String TOTFile::createFileName(const Common::String &base, bool &isLOM) {
+ isLOM = false;
+
+ const char *dot;
+ if ((dot = strrchr(base.c_str(), '.'))) {
+ // fileName includes an extension
+
+ if (!scumm_stricmp(dot + 1, "LOM"))
+ isLOM = true;
+
+ return base;
+ }
+
+ return base + ".tot";
+}
+
} // End of namespace Gob