Added sublime text 2 project file.
* Changed the order of the dofiles params.
This commit is contained in:
parent
18d23653c4
commit
e062562888
|
@ -1,4 +1,3 @@
|
||||||
/modules/.project
|
|
||||||
build*
|
build*
|
||||||
CMakeCache.txt
|
CMakeCache.txt
|
||||||
CMakeFiles
|
CMakeFiles
|
||||||
|
@ -39,3 +38,4 @@ tags
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
.directory
|
.directory
|
||||||
src/framework/graphics/dx/
|
src/framework/graphics/dx/
|
||||||
|
modules/.project/modules.sublime-workspace
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"folders":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"path": "..",
|
||||||
|
"folder_exclude_patterns": [".*", "*.*~"],
|
||||||
|
"file_exclude_patterns": [".*", "*.*~"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -577,18 +577,18 @@ int LuaInterface::lua_dofile(lua_State* L)
|
||||||
|
|
||||||
int LuaInterface::lua_dofiles(lua_State* L)
|
int LuaInterface::lua_dofiles(lua_State* L)
|
||||||
{
|
{
|
||||||
bool recursive = false;
|
|
||||||
if(g_lua.getTop() > 2) {
|
|
||||||
recursive = g_lua.popBoolean();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string contains = "";
|
std::string contains = "";
|
||||||
if(g_lua.getTop() > 1) {
|
if(g_lua.getTop() > 2) {
|
||||||
contains = g_lua.popString();
|
contains = g_lua.popString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool recursive = false;
|
||||||
|
if(g_lua.getTop() > 1) {
|
||||||
|
recursive = g_lua.popBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
std::string directory = g_lua.popString();
|
std::string directory = g_lua.popString();
|
||||||
g_lua.loadFiles(directory, contains, recursive);
|
g_lua.loadFiles(directory, recursive, contains);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1247,13 +1247,13 @@ int LuaInterface::getTop()
|
||||||
return lua_gettop(L);
|
return lua_gettop(L);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LuaInterface::loadFiles(std::string directory, std::string contains, bool recursive)
|
void LuaInterface::loadFiles(std::string directory, bool recursive, std::string contains)
|
||||||
{
|
{
|
||||||
for(const std::string& fileName : g_resources.listDirectoryFiles(directory)) {
|
for(const std::string& fileName : g_resources.listDirectoryFiles(directory)) {
|
||||||
std::string fullPath = directory + "/" + fileName;
|
std::string fullPath = directory + "/" + fileName;
|
||||||
|
|
||||||
if(recursive && g_resources.directoryExists(fullPath)) {
|
if(recursive && g_resources.directoryExists(fullPath)) {
|
||||||
loadFiles(fullPath, contains, true);
|
loadFiles(fullPath, true, contains);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -321,7 +321,7 @@ public:
|
||||||
void clearStack() { pop(stackSize()); }
|
void clearStack() { pop(stackSize()); }
|
||||||
bool hasIndex(int index) { return (stackSize() >= (index < 0 ? -index : index) && index != 0); }
|
bool hasIndex(int index) { return (stackSize() >= (index < 0 ? -index : index) && index != 0); }
|
||||||
|
|
||||||
void loadFiles(std::string directory, std::string contains, bool recursive = false);
|
void loadFiles(std::string directory, bool recursive = false, std::string contains = "");
|
||||||
|
|
||||||
/// Pushes any type onto the stack
|
/// Pushes any type onto the stack
|
||||||
template<typename T, typename... Args>
|
template<typename T, typename... Args>
|
||||||
|
|
Loading…
Reference in New Issue