From f95da5e3ee03ee61b1428c86dca4cc76f36c38bb Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 16 Aug 2010 15:16:46 +0000 Subject: SWORD25: Made game run with extracted data svn-id: r53252 --- engines/sword25/package/scummvmpackagemanager.cpp | 5 +++-- engines/sword25/script/luascript.cpp | 4 +--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/engines/sword25/package/scummvmpackagemanager.cpp b/engines/sword25/package/scummvmpackagemanager.cpp index ffd833e9b9..f3cbc93b61 100644 --- a/engines/sword25/package/scummvmpackagemanager.cpp +++ b/engines/sword25/package/scummvmpackagemanager.cpp @@ -113,18 +113,19 @@ bool BS_ScummVMPackageManager::LoadPackage(const Common::String &fileName, const bool BS_ScummVMPackageManager::LoadDirectoryAsPackage(const Common::String &directoryName, const Common::String &mountPosition) { Common::FSNode directory(directoryName); - Common::Archive *folderArchive = new Common::FSDirectory(directory); + Common::Archive *folderArchive = new Common::FSDirectory(directory, 6); if (!directory.exists() || (folderArchive == NULL)) { BS_LOG_ERRORLN("Unable to mount directory \"%s\" to \"%s\".", directoryName.c_str(), mountPosition.c_str()); return false; } else { BS_LOGLN("Directory '%s' mounted as '%s'.", directoryName.c_str(), mountPosition.c_str()); - _archiveList.push_front(new ArchiveEntry(folderArchive, mountPosition)); Common::ArchiveMemberList files; folderArchive->listMembers(files); debug(0, "Capacity %d", files.size()); + _archiveList.push_front(new ArchiveEntry(folderArchive, mountPosition)); + return true; } } diff --git a/engines/sword25/script/luascript.cpp b/engines/sword25/script/luascript.cpp index c6cfeb96ce..38363df94b 100644 --- a/engines/sword25/script/luascript.cpp +++ b/engines/sword25/script/luascript.cpp @@ -150,7 +150,7 @@ bool BS_LuaScriptEngine::ExecuteFile(const Common::String &FileName) { #ifdef DEBUG int __startStackDepth = lua_gettop(m_State); #endif - debug(0, "ExecuteFile(%s)", FileName.c_str()); + debug(2, "ExecuteFile(%s)", FileName.c_str()); // Get a pointer to the package manager BS_PackageManager *pPackage = static_cast(BS_Kernel::GetInstance()->GetService("package")); @@ -221,8 +221,6 @@ bool BS_LuaScriptEngine::RegisterStandardLibs() { // ----------------------------------------------------------------------------- bool BS_LuaScriptEngine::ExecuteBuffer(const char *Data, unsigned int Size, const Common::String &Name) const { - debug(0, "ExecuteBuffer()"); - // Compile buffer if (luaL_loadbuffer(m_State, Data, Size, Name.c_str()) != 0) { BS_LOG_ERRORLN("Couldn't compile \"%s\":\n%s", Name.c_str(), lua_tostring(m_State, -1)); -- cgit v1.2.3