Changeset 2026 for code/branches/objecthierarchy/src
- Timestamp:
- Oct 28, 2008, 3:06:23 PM (16 years ago)
- Location:
- code/branches/objecthierarchy/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/core/LuaBind.cc
r1961 r2026 123 123 isRunning_ = true; 124 124 int error = 0; 125 std::string init = "local scr = orxonox.LuaBind:getInstance()\nlocal debug = print\nprint = function(s)\nscr:luaPrint(s)\nend\ninclude = function(f)\nfile = io.open(f)\ncontent = file:read(\"*a\")\nfile:close()\nsource = scr:replaceLuaTags(content)\ndebug(source)\nassert(loadstring(source))()\nend\n";125 std::string init = "local scr = orxonox.LuaBind:getInstance()\nlocal debug = print\nprint = function(s)\nscr:luaPrint(s)\nend\ninclude = function(f)\nfile = assert(io.open(\"" + this->includePath_ + "\"..\"/\"..f))\ncontent = file:read(\"*a\")\nfile:close()\nsource = scr:replaceLuaTags(content)\nassert(loadstring(source))()\nend\n"; 126 126 init += luaSource_; 127 127 #if LUA_VERSION_NUM == 501 -
code/branches/objecthierarchy/src/core/LuaBind.h
r1959 r2026 79 79 std::string replaceLuaTags(const std::string& text); // tolua_export 80 80 81 inline void setIncludePath(const std::string& includepath) 82 { this->includePath_ = includepath; } 83 81 84 private: 82 85 LuaBind(); … … 87 90 lua_State* luaState_; 88 91 bool isRunning_; 92 std::string includePath_; 89 93 90 94 }; // tolua_export -
code/branches/objecthierarchy/src/orxonox/Settings.cc
r2011 r2026 39 39 #include "core/CoreIncludes.h" 40 40 #include "core/ConfigValueIncludes.h" 41 #include "core/LuaBind.h" 41 42 42 43 namespace orxonox … … 81 82 COUT(2) << "Warning: Data path set to \"/\", is that really correct?" << std::endl; 82 83 } 84 85 LuaBind::getInstance()->setIncludePath(this->dataPath_); 83 86 } 84 87
Note: See TracChangeset
for help on using the changeset viewer.