aboutsummaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorAlexander Pickering <alex@cogarr.net>2018-09-10 23:11:08 -0400
committerAlexander Pickering <alex@cogarr.net>2018-09-10 23:11:08 -0400
commitc38d5eca7091fc7f0206ed0c746622022b2ae508 (patch)
tree8c01d4a941b4152675354b8b7a46c0906e9fb40c /src/shared
parentb3c0d2ead1f384b35615be562c5f06804e8990cb (diff)
downloadbrokengine-c38d5eca7091fc7f0206ed0c746622022b2ae508.tar.gz
brokengine-c38d5eca7091fc7f0206ed0c746622022b2ae508.tar.bz2
brokengine-c38d5eca7091fc7f0206ed0c746622022b2ae508.zip
Added documentation
Also added treeview guielemnt Also added ifilesystem guielement Also added io library
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/lua_api/load_net.cpp17
-rw-r--r--src/shared/phys/physcommon.cpp1
2 files changed, 16 insertions, 2 deletions
diff --git a/src/shared/lua_api/load_net.cpp b/src/shared/lua_api/load_net.cpp
index cc2db02..4baf952 100644
--- a/src/shared/lua_api/load_net.cpp
+++ b/src/shared/lua_api/load_net.cpp
@@ -201,6 +201,13 @@ int lstream_writedouble(lua_State* L){
return 0;
}
+/***
+Get the pipe from this stream.
+Gets the pipe from this stream, using the return value can be used with setpipe()
+later to identify clients of a PAIR pipe
+@function stream:getpipe()
+@treturn pipe The pipe connected to the associated stream
+*/
//stream:getpipe() :: pipe
int lstream_getpipe(lua_State* L){
lua_getfield(L,-1,"data");//{stream},ud_stream
@@ -212,6 +219,12 @@ int lstream_getpipe(lua_State* L){
return 1;
}
+/***
+Sets the pipe for the stream.
+Sets the pipe for the stream, so that content is delivered to a specific client.
+@function stream:setpipe()
+@tparam pipe pipe The pipe for the specific client, gotten with stream:getpipe()
+*/
//stream:setpipe(pipe)
int lstream_setpipe(lua_State* L){
lua_getfield(L,-1,"pipe");//{stream},{pipe},ud_pipe
@@ -300,8 +313,8 @@ void gameloop_net(lua_State* L){
luaL_getmetatable(L,"net.stream");//func,{data=stream}
lua_setmetatable(L,-2);//func,{stream}
lua_call(L,1,0);//
- printf("Finished calling gameloop\n");
- nng_free(buf,size);
+ __mingw_printf("Finished calling gameloop, buf is %p, size is %zu\n",buf,size);
+ nng_msg_free(msgp);
printf("called nn_freemsg\n");
free(stream);//We manually set stream->data so free_stream would crash here
printf("Called free on stream\n");
diff --git a/src/shared/phys/physcommon.cpp b/src/shared/phys/physcommon.cpp
index b1c4c67..6092b4f 100644
--- a/src/shared/phys/physcommon.cpp
+++ b/src/shared/phys/physcommon.cpp
@@ -78,6 +78,7 @@ void UpdatePhysics(double TDeltaTime, void(*f)(btRigidBody*)) {
high_resolution_clock::time_point t1 = high_resolution_clock::now();
void gameloop_phys(void(*f)(btRigidBody*)){
+ //printf("Doing phys gameloop\n");
high_resolution_clock::time_point now = high_resolution_clock::now();
duration<double> delta = now-t1;
double steps = delta.count() * 10;