Browse Source

Added sublime text 2 project file.

* Changed the order of the dofiles params.
BeniS 7 years ago
parent
commit
e062562888

+ 1
- 1
.gitignore View File

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

+ 10
- 0
modules/.project/modules.sublime-project View File

@@ -0,0 +1,10 @@
1
+{
2
+	"folders":
3
+	[
4
+		{
5
+			"path": "..",
6
+			"folder_exclude_patterns": [".*", "*.*~"],
7
+			"file_exclude_patterns": [".*", "*.*~"]
8
+		}
9
+	]
10
+}

+ 7
- 7
src/framework/luaengine/luainterface.cpp View File

@@ -577,18 +577,18 @@ int LuaInterface::lua_dofile(lua_State* L)
577 577
 
578 578
 int LuaInterface::lua_dofiles(lua_State* L)
579 579
 {
580
-    bool recursive = false;
580
+    std::string contains = "";
581 581
     if(g_lua.getTop() > 2) {
582
-        recursive = g_lua.popBoolean();
582
+        contains = g_lua.popString();
583 583
     }
584 584
 
585
-    std::string contains = "";
585
+    bool recursive = false;
586 586
     if(g_lua.getTop() > 1) {
587
-        contains = g_lua.popString();
587
+        recursive = g_lua.popBoolean();
588 588
     }
589 589
 
590 590
     std::string directory = g_lua.popString();
591
-    g_lua.loadFiles(directory, contains, recursive);
591
+    g_lua.loadFiles(directory, recursive, contains);
592 592
 
593 593
     return 0;
594 594
 }
@@ -1247,13 +1247,13 @@ int LuaInterface::getTop()
1247 1247
     return lua_gettop(L);
1248 1248
 }
1249 1249
 
1250
-void LuaInterface::loadFiles(std::string directory, std::string contains, bool recursive)
1250
+void LuaInterface::loadFiles(std::string directory, bool recursive, std::string contains)
1251 1251
 {
1252 1252
     for(const std::string& fileName : g_resources.listDirectoryFiles(directory)) {
1253 1253
         std::string fullPath = directory + "/" + fileName;
1254 1254
 
1255 1255
         if(recursive && g_resources.directoryExists(fullPath)) {
1256
-            loadFiles(fullPath, contains, true);
1256
+            loadFiles(fullPath, true, contains);
1257 1257
             continue;
1258 1258
         }
1259 1259
 

+ 1
- 1
src/framework/luaengine/luainterface.h View File

@@ -321,7 +321,7 @@ public:
321 321
     void clearStack() { pop(stackSize()); }
322 322
     bool hasIndex(int index) { return (stackSize() >= (index < 0 ? -index : index) && index != 0); }
323 323
 
324
-    void loadFiles(std::string directory, std::string contains, bool recursive = false);
324
+    void loadFiles(std::string directory, bool recursive = false, std::string contains = "");
325 325
 
326 326
     /// Pushes any type onto the stack
327 327
     template<typename T, typename... Args>

Loading…
Cancel
Save