mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-31 07:53:36 +00:00
SWORD25: Fix initialization.
svn-id: r53245
This commit is contained in:
parent
fbdbc089e0
commit
f4024d7d14
@ -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.");
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user