diff options
author | Eugene Sandulenko | 2010-08-14 22:32:23 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2010-10-12 22:46:35 +0000 |
commit | f4024d7d14a0101e88ca2e49d97c0da353a893d9 (patch) | |
tree | 22b4322b50bfe84de8700e9b8c8d203dc6dc7443 | |
parent | fbdbc089e087e8ccdb58cdc4bcc8812385d6c1ba (diff) | |
download | scummvm-rg350-f4024d7d14a0101e88ca2e49d97c0da353a893d9.tar.gz scummvm-rg350-f4024d7d14a0101e88ca2e49d97c0da353a893d9.tar.bz2 scummvm-rg350-f4024d7d14a0101e88ca2e49d97c0da353a893d9.zip |
SWORD25: Fix initialization.
svn-id: r53245
-rw-r--r-- | engines/sword25/gfx/graphicengine.cpp | 3 | ||||
-rw-r--r-- | engines/sword25/package/scummvmpackagemanager.cpp | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/engines/sword25/gfx/graphicengine.cpp b/engines/sword25/gfx/graphicengine.cpp index f20d858707..150c87366e 100644 --- a/engines/sword25/gfx/graphicengine.cpp +++ b/engines/sword25/gfx/graphicengine.cpp @@ -71,8 +71,7 @@ BS_GraphicEngine::BS_GraphicEngine(BS_Kernel *pKernel) : m_FrameTimeSampleSlot(0), m_RepaintedPixels(0), BS_ResourceService(pKernel) { - for (int i = 0; i < FRAMETIME_SAMPLE_COUNT; i++) - m_FrameTimeSamples[i] = 0; + m_FrameTimeSamples.resize(FRAMETIME_SAMPLE_COUNT); if (!RegisterScriptBindings()) BS_LOG_ERRORLN("Script bindings could not be registered."); diff --git a/engines/sword25/package/scummvmpackagemanager.cpp b/engines/sword25/package/scummvmpackagemanager.cpp index f06e82ff8f..9dafb45c08 100644 --- a/engines/sword25/package/scummvmpackagemanager.cpp +++ b/engines/sword25/package/scummvmpackagemanager.cpp @@ -223,7 +223,7 @@ bool BS_ScummVMPackageManager::LoadDirectoryAsPackage(const Common::String &Dire void *BS_ScummVMPackageManager::GetFile(const Common::String &FileName, unsigned int *FileSizePtr) { Common::SeekableReadStream *in; Common::ArchiveMemberPtr fileNode = GetArchiveMember(FileName); - if (fileNode->getName().empty()) + if (!fileNode) return 0; if (!(in = fileNode->createReadStream())) return 0; @@ -267,7 +267,7 @@ Common::String BS_ScummVMPackageManager::GetAbsolutePath(const Common::String &F unsigned int BS_ScummVMPackageManager::GetFileSize(const Common::String &FileName) { Common::SeekableReadStream *in; Common::ArchiveMemberPtr fileNode = GetArchiveMember(FileName); - if (fileNode->getName().empty()) + if (!fileNode) return 0; if (!(in = fileNode->createReadStream())) return 0; @@ -290,7 +290,7 @@ unsigned int BS_ScummVMPackageManager::GetFileType(const Common::String &FileNam bool BS_ScummVMPackageManager::FileExists(const Common::String &FileName) { Common::ArchiveMemberPtr fileNode = GetArchiveMember(FileName); - return !fileNode->getName().empty(); + return fileNode; } // ----------------------------------------------------------------------------- |