aboutsummaryrefslogtreecommitdiff
path: root/src/client/lua_api/io
diff options
context:
space:
mode:
authorAlexander <alex@cogarr.net>2020-06-29 15:29:03 -0400
committerAlexander <alex@cogarr.net>2020-06-29 15:29:03 -0400
commit80789508b9655d25629223b9dcc84b4cfb77ce45 (patch)
tree37e140e532af61c1ca4699c8b6254cf2cb07ed02 /src/client/lua_api/io
parent44a1421c393632978d59c0698a93ae22243b97e9 (diff)
downloadbrokengine-80789508b9655d25629223b9dcc84b4cfb77ce45.tar.gz
brokengine-80789508b9655d25629223b9dcc84b4cfb77ce45.tar.bz2
brokengine-80789508b9655d25629223b9dcc84b4cfb77ce45.zip
Updates for mdoc
Also more tests
Diffstat (limited to 'src/client/lua_api/io')
-rw-r--r--src/client/lua_api/io/ifilesystem.cpp34
1 files changed, 26 insertions, 8 deletions
diff --git a/src/client/lua_api/io/ifilesystem.cpp b/src/client/lua_api/io/ifilesystem.cpp
index 252b61b..12aab78 100644
--- a/src/client/lua_api/io/ifilesystem.cpp
+++ b/src/client/lua_api/io/ifilesystem.cpp
@@ -1,8 +1,5 @@
#include "ifilesystem.hpp"
-/***
-@module io
-*/
using namespace irr;
using namespace io;
@@ -11,7 +8,7 @@ extern IrrlichtDevice* device;
/***
A list of files in the current direcotry.
-@function list()
+@function io.list()
@treturn array The files and directories in the current directory.
*/
// io.list()
@@ -36,7 +33,7 @@ int listfilesin(lua_State *L){
/***
Changes the current directory of the program
-@function cd(dir)
+@function io.cd(dir)
@tparam string dir The directory to change to
*/
// io.cd("directory")
@@ -52,10 +49,10 @@ int changedirectory(lua_State *L){
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])
+@function io.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
+@tparam? string hint An optional hint to supply with the log
*/
// io.log("text",level)
// io.log("text",level[,"hint"])
@@ -83,7 +80,7 @@ int logmessage(lua_State *L){
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)
+@function io.set_log_level(level)
@tparam number level the minimul level of log to capture
*/
//io.set_log_level(level)
@@ -120,14 +117,35 @@ void ifilesystem_register(lua_State* L){
lua_getglobal(L,"io");//{io}
luaL_register(L,NULL,ifilesystem_f);
+/***
+Debugging log level
+@field io.LOG_DEBUG
+*/
lua_pushnumber(L,ELL_DEBUG);
lua_setfield(L,-2,"LOG_DEBUG");
+/***
+Informational log level
+@field io.LOG_INTO
+*/
lua_pushnumber(L,ELL_INFORMATION);
lua_setfield(L,-2,"LOG_INFO");
+/***
+Warning log level
+@field io.LOG_WARN
+*/
lua_pushnumber(L,ELL_WARNING);
lua_setfield(L,-2,"LOG_WARN");
+/***
+Error log level
+@field io.LOG_ERROR
+*/
lua_pushnumber(L,ELL_ERROR);
lua_setfield(L,-2,"LOG_ERROR");
+/***
+Nonetype log level.
+Use this with @{io#set_log_level} if you don't want to log anything.
+@field io.LOG_NONE
+*/
lua_pushnumber(L,ELL_NONE);
lua_setfield(L,-2,"LOG_NONE");