Added sublime text 2 project file.

* Changed the order of the dofiles params.
This commit is contained in:
BeniS 2013-05-12 21:16:43 +12:00
parent 18d23653c4
commit e062562888
4 changed files with 21 additions and 11 deletions

2
.gitignore vendored
View File

@ -1,4 +1,3 @@
/modules/.project
build*
CMakeCache.txt
CMakeFiles
@ -39,3 +38,4 @@ tags
Thumbs.db
.directory
src/framework/graphics/dx/
modules/.project/modules.sublime-workspace

View File

@ -0,0 +1,10 @@
{
"folders":
[
{
"path": "..",
"folder_exclude_patterns": [".*", "*.*~"],
"file_exclude_patterns": [".*", "*.*~"]
}
]
}

View File

@ -577,18 +577,18 @@ int LuaInterface::lua_dofile(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 = "";
if(g_lua.getTop() > 1) {
if(g_lua.getTop() > 2) {
contains = g_lua.popString();
}
bool recursive = false;
if(g_lua.getTop() > 1) {
recursive = g_lua.popBoolean();
}
std::string directory = g_lua.popString();
g_lua.loadFiles(directory, contains, recursive);
g_lua.loadFiles(directory, recursive, contains);
return 0;
}
@ -1247,13 +1247,13 @@ int LuaInterface::getTop()
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)) {
std::string fullPath = directory + "/" + fileName;
if(recursive && g_resources.directoryExists(fullPath)) {
loadFiles(fullPath, contains, true);
loadFiles(fullPath, true, contains);
continue;
}

View File

@ -321,7 +321,7 @@ public:
void clearStack() { pop(stackSize()); }
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
template<typename T, typename... Args>