aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-05-09 15:18:35 +0200
committerEinar Johan Trøan Sømåen2012-06-02 12:42:09 +0200
commitecc03331dbc0ba5b2ea6ced1dea7ae171f515ab1 (patch)
tree436a650b9fcca2977599e34719f46f9b1e40eb35 /engines
parent2f7fe9f443464f3b0fc93966753266be5ac8741f (diff)
downloadscummvm-rg350-ecc03331dbc0ba5b2ea6ced1dea7ae171f515ab1.tar.gz
scummvm-rg350-ecc03331dbc0ba5b2ea6ced1dea7ae171f515ab1.tar.bz2
scummvm-rg350-ecc03331dbc0ba5b2ea6ced1dea7ae171f515ab1.zip
WINTERMUTE: Correct assumptions about PathUtil::GetExtension
This puts it in line with Common::lastPathComponent, i.e. not including the '.'
Diffstat (limited to 'engines')
-rw-r--r--engines/wintermute/BFileManager.cpp2
-rw-r--r--engines/wintermute/BSoundMgr.cpp4
-rw-r--r--engines/wintermute/BSprite.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/engines/wintermute/BFileManager.cpp b/engines/wintermute/BFileManager.cpp
index 0967df5518..68a4db4910 100644
--- a/engines/wintermute/BFileManager.cpp
+++ b/engines/wintermute/BFileManager.cpp
@@ -371,7 +371,7 @@ HRESULT CBFileManager::RegisterPackages() {
RegisterPackage("data.dcp");
RegisterPackage("english.dcp");
#if 0
- AnsiString extension = AnsiString(".") + AnsiString(PACKAGE_EXTENSION);
+ AnsiString extension = AnsiString(PACKAGE_EXTENSION);
for (int i = 0; i < _packagePaths.GetSize(); i++) {
boost::filesystem::path absPath = boost::filesystem::syste_complete(_packagePaths[i]);
diff --git a/engines/wintermute/BSoundMgr.cpp b/engines/wintermute/BSoundMgr.cpp
index 3f2837b1db..469d601e46 100644
--- a/engines/wintermute/BSoundMgr.cpp
+++ b/engines/wintermute/BSoundMgr.cpp
@@ -135,11 +135,11 @@ CBSoundBuffer *CBSoundMgr::AddSound(const char *Filename, TSoundType Type, bool
// try to switch WAV to OGG file (if available)
AnsiString ext = PathUtil::GetExtension(Filename);
- if (StringUtil::CompareNoCase(ext, ".wav")) {
+ if (StringUtil::CompareNoCase(ext, "wav")) {
AnsiString path = PathUtil::GetDirectoryName(Filename);
AnsiString name = PathUtil::GetFileNameWithoutExtension(Filename);
- AnsiString newFile = PathUtil::Combine(path, name + ".ogg");
+ AnsiString newFile = PathUtil::Combine(path, name + "ogg");
CBFile *file = Game->_fileManager->OpenFile(newFile.c_str());
if (file) {
Filename = newFile.c_str();
diff --git a/engines/wintermute/BSprite.cpp b/engines/wintermute/BSprite.cpp
index d951f25461..1fc5ba296a 100644
--- a/engines/wintermute/BSprite.cpp
+++ b/engines/wintermute/BSprite.cpp
@@ -135,7 +135,7 @@ HRESULT CBSprite::LoadFile(char *Filename, int LifeTime, TSpriteCacheType CacheT
HRESULT ret;
AnsiString ext = PathUtil::GetExtension(Filename);
- if (StringUtil::StartsWith(Filename, "savegame:", true) || StringUtil::CompareNoCase(ext, ".bmp") || StringUtil::CompareNoCase(ext, ".tga") || StringUtil::CompareNoCase(ext, ".png") || StringUtil::CompareNoCase(ext, ".jpg")) {
+ if (StringUtil::StartsWith(Filename, "savegame:", true) || StringUtil::CompareNoCase(ext, "bmp") || StringUtil::CompareNoCase(ext, "tga") || StringUtil::CompareNoCase(ext, "png") || StringUtil::CompareNoCase(ext, "jpg")) {
CBFrame *frame = new CBFrame(Game);
CBSubFrame *subframe = new CBSubFrame(Game);
subframe->SetSurface(Filename, true, 0, 0, 0, LifeTime, true);