diff options
| author | Alexander Pickering <alex@cogarr.net> | 2018-10-31 12:39:50 -0400 |
|---|---|---|
| committer | Alexander Pickering <alex@cogarr.net> | 2018-10-31 12:39:50 -0400 |
| commit | 6df9cb0de3e457788808b485b8b34bd8f0d6e42b (patch) | |
| tree | de15337ea18f28f8643aedabfe2c34448a1b45fe /src/client/lua_api/io | |
| parent | 133e620665037ea2b66da65c67716b290711bfde (diff) | |
| download | brokengine-6df9cb0de3e457788808b485b8b34bd8f0d6e42b.tar.gz brokengine-6df9cb0de3e457788808b485b8b34bd8f0d6e42b.tar.bz2 brokengine-6df9cb0de3e457788808b485b8b34bd8f0d6e42b.zip | |
Added more documentation
Added documentation for luadoc for
* io.*
* phys.*
* video.*
Diffstat (limited to 'src/client/lua_api/io')
| -rw-r--r-- | src/client/lua_api/io/ifilesystem.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/client/lua_api/io/ifilesystem.cpp b/src/client/lua_api/io/ifilesystem.cpp index 9d12b22..252b61b 100644 --- a/src/client/lua_api/io/ifilesystem.cpp +++ b/src/client/lua_api/io/ifilesystem.cpp @@ -1,11 +1,19 @@ #include "ifilesystem.hpp" +/*** +@module io +*/ using namespace irr; using namespace io; extern IrrlichtDevice* device; +/*** +A list of files in the current direcotry. +@function list() +@treturn array The files and directories in the current directory. +*/ // io.list() int listfilesin(lua_State *L){ IFileSystem *fs = device->getFileSystem(); @@ -26,6 +34,11 @@ int listfilesin(lua_State *L){ return 1; } +/*** +Changes the current directory of the program +@function cd(dir) +@tparam string dir The directory to change to +*/ // io.cd("directory") int changedirectory(lua_State *L){ IFileSystem *fs = device->getFileSystem(); @@ -35,6 +48,15 @@ int changedirectory(lua_State *L){ return 0; } +/*** +Logs some text with Irrlicht. +`level` may be any of: +io.LOG_DEBUG, io.LOG_INFO, io.LOG_WARN, io.LOG_ERROR, io.LOG_NONE +@function log(text,level[,hint]) +@tparam string text The text to log +@tparam log_level_enum level The log level +@tparam string hint An optional hint to supply with the log +*/ // io.log("text",level) // io.log("text",level[,"hint"]) int logmessage(lua_State *L){ @@ -57,6 +79,13 @@ int logmessage(lua_State *L){ return 0; } +/*** +Sets what output gets logged, and what gets ignored. +level may be any of: +io.LOG_DEBUG, io.LOG_INFO, io.LOG_WARN, io.LOG_ERROR, io.LOG_NONE +@function set_log_level(level) +@tparam number level the minimul level of log to capture +*/ //io.set_log_level(level) int setloglevel(lua_State *L){ ILogger *log = device->getLogger(); |
