From 82f1ebcafed7e565ac4dce610f7bc098f45ee67d Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Tue, 23 Jun 2009 23:55:35 +0000 Subject: Putting TOT filename generation and LOM checking into TOTFile svn-id: r41822 --- engines/gob/totfile.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'engines/gob/totfile.cpp') 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 -- cgit v1.2.3