diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-11-07 18:42:19 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-11-07 18:42:19 +0000 |
commit | e29fd4d0ead4353ff2e03fcd793400d8e0779481 (patch) | |
tree | de0d47e86f816ea6cfca63ab8b394c09daf0725a /plugins/MirLua/src/mlua_script_loader.cpp | |
parent | a50edcaccf9c335a8b4fd6dc144916f3aed9ca8f (diff) |
MirLua: added metatables wrapper
git-svn-id: http://svn.miranda-ng.org/main/trunk@15697 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/mlua_script_loader.cpp')
-rw-r--r-- | plugins/MirLua/src/mlua_script_loader.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/MirLua/src/mlua_script_loader.cpp b/plugins/MirLua/src/mlua_script_loader.cpp index 9f83d6b9cb..b95b907c8a 100644 --- a/plugins/MirLua/src/mlua_script_loader.cpp +++ b/plugins/MirLua/src/mlua_script_loader.cpp @@ -18,13 +18,13 @@ void CLuaScriptLoader::RegisterScriptsFolder(const char *path) lua_pop(L, 1);
}
-void CLuaScriptLoader::LoadScript(const TCHAR *scriptDir, const TCHAR *file, int iGroup)
+void CLuaScriptLoader::LoadScript(const TCHAR *scriptDir, const TCHAR *file)
{
TCHAR fullPath[MAX_PATH], path[MAX_PATH];
mir_sntprintf(fullPath, _T("%s\\%s"), scriptDir, file);
PathToRelativeT(fullPath, path);
- CMLuaScript *script = new CMLuaScript(L, path, iGroup);
+ CMLuaScript *script = new CMLuaScript(L, path);
g_mLua->Scripts.insert(script);
TCHAR buf[4096];
@@ -38,13 +38,12 @@ void CLuaScriptLoader::LoadScript(const TCHAR *scriptDir, const TCHAR *file, int if (script->Load())
{
- TCHAR buf[4096];
mir_sntprintf(buf, _T("%s:OK"), path);
CallService(MS_NETLIB_LOGW, (WPARAM)hNetlib, (LPARAM)buf);
}
}
-void CLuaScriptLoader::LoadScripts(const TCHAR *scriptDir, int iGroup)
+void CLuaScriptLoader::LoadScripts(const TCHAR *scriptDir)
{
TCHAR buf[4096];
mir_sntprintf(buf, _T("Loading scripts from %s"), scriptDir);
@@ -63,7 +62,7 @@ void CLuaScriptLoader::LoadScripts(const TCHAR *scriptDir, int iGroup) {
if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
continue;
- LoadScript(scriptDir, fd.cFileName, iGroup);
+ LoadScript(scriptDir, fd.cFileName);
} while (FindNextFile(hFind, &fd));
FindClose(hFind);
}
@@ -75,5 +74,5 @@ void CLuaScriptLoader::Load(lua_State *L) CLuaScriptLoader loader(L);
FoldersGetCustomPathT(g_hCommonScriptFolder, scriptDir, _countof(scriptDir), VARST(COMMON_SCRIPTS_PATHT));
- loader.LoadScripts(scriptDir, 0);
+ loader.LoadScripts(scriptDir);
}
\ No newline at end of file |