From 6df9cb0de3e457788808b485b8b34bd8f0d6e42b Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Wed, 31 Oct 2018 12:39:50 -0400 Subject: Added more documentation Added documentation for luadoc for * io.* * phys.* * video.* --- src/client/lua_api/io/ifilesystem.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/client/lua_api/io') 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(); -- cgit v1.2.3-70-g09d2