aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/lua_api/gui/iguibutton.cpp4
-rw-r--r--src/client/lua_api/gui/iguicheckbox.cpp2
-rw-r--r--src/client/lua_api/gui/iguicolorselector.cpp2
-rw-r--r--src/client/lua_api/gui/iguicombobox.cpp4
-rw-r--r--src/client/lua_api/gui/iguieditbox.cpp4
-rw-r--r--src/client/lua_api/gui/iguielement.cpp2
-rw-r--r--src/client/lua_api/gui/iguifiledialog.cpp4
-rw-r--r--src/client/lua_api/gui/iguiimage.cpp2
-rw-r--r--src/client/lua_api/gui/iguilabel.cpp4
-rw-r--r--src/client/lua_api/gui/iguispinbox.cpp4
-rw-r--r--src/client/lua_api/gui/iguitreeview.cpp6
-rw-r--r--src/client/lua_api/gui/iguiwindow.cpp2
-rw-r--r--src/client/lua_api/io/ifilesystem.cpp14
-rw-r--r--src/client/lua_api/phys/cbcharactercontroller.cpp2
-rw-r--r--src/client/lua_api/phys/cbphysbox.cpp2
-rw-r--r--src/client/lua_api/phys/cbphysmodel.cpp4
-rw-r--r--src/client/lua_api/scene/icamera.cpp6
-rw-r--r--src/client/lua_api/scene/igeneric.cpp2
-rw-r--r--src/client/lua_api/scene/igeneric.hpp2
-rw-r--r--src/client/lua_api/scene/ilight.cpp2
-rw-r--r--src/client/lua_api/scene/imesh.cpp4
-rw-r--r--src/client/lua_api/video/iimage.cpp2
-rw-r--r--src/client/lua_api/video/smaterial.cpp2
-rw-r--r--src/client/main.cpp8
-rw-r--r--src/shared/lua_api/phys/bcharactercontroller.cpp2
-rw-r--r--src/shared/lua_api/phys/bcharactercontroller.hpp2
-rw-r--r--src/shared/lua_api/phys/bcollider.cpp2
-rw-r--r--src/shared/lua_api/phys/bcollider.hpp2
-rw-r--r--src/shared/lua_api/phys/bghostobject.cpp2
-rw-r--r--src/shared/lua_api/phys/bhingeconstraint.cpp2
-rw-r--r--src/shared/lua_api/phys/bphysbuffer.cpp4
-rw-r--r--src/shared/lua_api/phys/bphysgeneric.cpp2
-rw-r--r--src/shared/lua_api/phys/bphysgeneric.hpp2
-rw-r--r--src/shared/lua_api/phys/bphysmodel.cpp4
-rw-r--r--src/shared/lua_api/phys/bshape.cpp4
35 files changed, 63 insertions, 55 deletions
diff --git a/src/client/lua_api/gui/iguibutton.cpp b/src/client/lua_api/gui/iguibutton.cpp
index cdbea77..999e667 100644
--- a/src/client/lua_api/gui/iguibutton.cpp
+++ b/src/client/lua_api/gui/iguibutton.cpp
@@ -79,12 +79,12 @@ static int newiguibutton(lua_State* L){
return 1;
}
-static const luaL_reg iguibutton_f[] = {
+static const luaL_Reg iguibutton_f[] = {
{"new", newiguibutton},
{0,0},
};
-static const luaL_reg iguibutton_m[] = {
+static const luaL_Reg iguibutton_m[] = {
{0,0},
};
diff --git a/src/client/lua_api/gui/iguicheckbox.cpp b/src/client/lua_api/gui/iguicheckbox.cpp
index 365b75d..bf8e756 100644
--- a/src/client/lua_api/gui/iguicheckbox.cpp
+++ b/src/client/lua_api/gui/iguicheckbox.cpp
@@ -87,7 +87,7 @@ int setchecked(lua_State *L){
return 0;
}
-static const luaL_reg iguicheckbox_m[] = {
+static const luaL_Reg iguicheckbox_m[] = {
{"ischecked", ischecked},
{"setchecked", setchecked},
{0,0},
diff --git a/src/client/lua_api/gui/iguicolorselector.cpp b/src/client/lua_api/gui/iguicolorselector.cpp
index 5a11394..716ffd1 100644
--- a/src/client/lua_api/gui/iguicolorselector.cpp
+++ b/src/client/lua_api/gui/iguicolorselector.cpp
@@ -55,7 +55,7 @@ int newiguicolorselector(lua_State* L){
return 1;
}
-static const luaL_reg iguicolorselector_m[] = {
+static const luaL_Reg iguicolorselector_m[] = {
{0,0},
};
diff --git a/src/client/lua_api/gui/iguicombobox.cpp b/src/client/lua_api/gui/iguicombobox.cpp
index a9c4137..b97e541 100644
--- a/src/client/lua_api/gui/iguicombobox.cpp
+++ b/src/client/lua_api/gui/iguicombobox.cpp
@@ -116,12 +116,12 @@ int removeitem(lua_State *L){
return 0;
}
-static const luaL_reg iguicombobox_f[] = {
+static const luaL_Reg iguicombobox_f[] = {
{"new", newiguicombobox},
{0,0},
};
-static const luaL_reg iguicombobox_m[] = {
+static const luaL_Reg iguicombobox_m[] = {
{"add", additem},
{"get", getselected},
{"remove", removeitem},
diff --git a/src/client/lua_api/gui/iguieditbox.cpp b/src/client/lua_api/gui/iguieditbox.cpp
index 409c2fc..020a405 100644
--- a/src/client/lua_api/gui/iguieditbox.cpp
+++ b/src/client/lua_api/gui/iguieditbox.cpp
@@ -86,12 +86,12 @@ int set_multiline(lua_State *L){
return 0;
}
-static const luaL_reg iguieditbox_f[] = {
+static const luaL_Reg iguieditbox_f[] = {
{"neweditbox",newiguieditbox},
{0,0},
};
-static const luaL_reg iguieditbox_m[] = {
+static const luaL_Reg iguieditbox_m[] = {
{"set_multiline",set_multiline},
{0,0},
};
diff --git a/src/client/lua_api/gui/iguielement.cpp b/src/client/lua_api/gui/iguielement.cpp
index 17ec4a5..bf83230 100644
--- a/src/client/lua_api/gui/iguielement.cpp
+++ b/src/client/lua_api/gui/iguielement.cpp
@@ -304,7 +304,7 @@ int guigetid(lua_State* L){
}
-extern const luaL_reg iguielement_m[] = {
+extern const luaL_Reg iguielement_m[] = {
{"move", moveiguielement},
{"setvisible", setvisible},
{"setrect", setrelrect},
diff --git a/src/client/lua_api/gui/iguifiledialog.cpp b/src/client/lua_api/gui/iguifiledialog.cpp
index 8e038c5..2634b14 100644
--- a/src/client/lua_api/gui/iguifiledialog.cpp
+++ b/src/client/lua_api/gui/iguifiledialog.cpp
@@ -135,12 +135,12 @@ int getname(lua_State *L){
return 1;
}
-static const luaL_reg iguifileopendialog_f[] = {
+static const luaL_Reg iguifileopendialog_f[] = {
{"new", newfileopendialog},
{0,0},
};
-static const luaL_reg iguifileopendialog_m[] = {
+static const luaL_Reg iguifileopendialog_m[] = {
{"getdir", getdir},
{"getname", getname},
{0,0},
diff --git a/src/client/lua_api/gui/iguiimage.cpp b/src/client/lua_api/gui/iguiimage.cpp
index 3251fff..f88268d 100644
--- a/src/client/lua_api/gui/iguiimage.cpp
+++ b/src/client/lua_api/gui/iguiimage.cpp
@@ -101,7 +101,7 @@ int setimage(lua_State *L){
return 0;
}
-static const luaL_reg iguiimage_m[] = {
+static const luaL_Reg iguiimage_m[] = {
{"setcolor", setcolor},
{"setimage", setimage},
{0, 0},
diff --git a/src/client/lua_api/gui/iguilabel.cpp b/src/client/lua_api/gui/iguilabel.cpp
index 1709d5e..a101bbd 100644
--- a/src/client/lua_api/gui/iguilabel.cpp
+++ b/src/client/lua_api/gui/iguilabel.cpp
@@ -75,12 +75,12 @@ static int newiguilabel(lua_State* L){
return 1;
}
-static const luaL_reg iguilabel_f[] = {
+static const luaL_Reg iguilabel_f[] = {
{"newlabel", newiguilabel},
{0,0},
};
-static const luaL_reg iguilabel_m[] = {
+static const luaL_Reg iguilabel_m[] = {
{0, 0},
};
diff --git a/src/client/lua_api/gui/iguispinbox.cpp b/src/client/lua_api/gui/iguispinbox.cpp
index a431396..d34d0fb 100644
--- a/src/client/lua_api/gui/iguispinbox.cpp
+++ b/src/client/lua_api/gui/iguispinbox.cpp
@@ -80,12 +80,12 @@ static int newiguispinbox(lua_State* L){
return 1;
}
-static const luaL_reg iguispinbox_f[] = {
+static const luaL_Reg iguispinbox_f[] = {
{"new", newiguispinbox},
{0,0},
};
-static const luaL_reg iguispinbox_m[] = {
+static const luaL_Reg iguispinbox_m[] = {
{0,0},
};
diff --git a/src/client/lua_api/gui/iguitreeview.cpp b/src/client/lua_api/gui/iguitreeview.cpp
index ff4e655..1a0a212 100644
--- a/src/client/lua_api/gui/iguitreeview.cpp
+++ b/src/client/lua_api/gui/iguitreeview.cpp
@@ -170,17 +170,17 @@ int prependChild(lua_State *L){
}
-static const luaL_reg iguitreeview_f[] = {
+static const luaL_Reg iguitreeview_f[] = {
{"newtreeview", newiguitreeview},
{0,0},
};
-static const luaL_reg iguitreeview_m[] = {
+static const luaL_Reg iguitreeview_m[] = {
{"getroot", getRootNode},
{0,0},
};
-static const luaL_reg iguitreeviewnode_m[] = {
+static const luaL_Reg iguitreeviewnode_m[] = {
{"prepend_child", prependChild},
{"append_child", appendChild},
{0,0},
diff --git a/src/client/lua_api/gui/iguiwindow.cpp b/src/client/lua_api/gui/iguiwindow.cpp
index 70f26e4..f3cb2d8 100644
--- a/src/client/lua_api/gui/iguiwindow.cpp
+++ b/src/client/lua_api/gui/iguiwindow.cpp
@@ -75,7 +75,7 @@ static int newiguiwindow(lua_State* L){
return 1;
}
-static const luaL_reg iguiwindow_m[] = {
+static const luaL_Reg iguiwindow_m[] = {
// bool :: iguiwindow:close() -- Called when window is closed, returning
// -- Anything but false or nil prevents close
{0, 0},
diff --git a/src/client/lua_api/io/ifilesystem.cpp b/src/client/lua_api/io/ifilesystem.cpp
index 12aab78..588bddd 100644
--- a/src/client/lua_api/io/ifilesystem.cpp
+++ b/src/client/lua_api/io/ifilesystem.cpp
@@ -13,20 +13,28 @@ A list of files in the current direcotry.
*/
// io.list()
int listfilesin(lua_State *L){
+ printf("Device is: %p\n",(void*)device);
IFileSystem *fs = device->getFileSystem();
+ printf("Got file system %p\n",(void*)fs);
IFileList *fl = fs->createFileList();
+ printf("Created file list\n");
- unsigned long fc = fl->getFileCount();
+ u32 fc = fl->getFileCount();
+ printf("Got file count\n");
unsigned long i;
const char *path;
lua_newtable(L);
for(i = 0; i < fc; i++){
+ printf("Adding list item %lu \n",i);
path = fl->getFileName(i).c_str();
+ printf("Got item name: %s\n",path);
lua_pushnumber(L,i + 1);
lua_pushstring(L,path);
lua_settable(L,-3);
}
+
+ fl->drop();
return 1;
}
@@ -93,7 +101,7 @@ int setloglevel(lua_State *L){
return 0;
}
-static const luaL_reg ifilesystem_f[] = {
+static const luaL_Reg ifilesystem_f[] = {
{"log", logmessage},
{"set_log_level", setloglevel},
{"list", listfilesin},
@@ -101,7 +109,7 @@ static const luaL_reg ifilesystem_f[] = {
{0,0},
};
-static const luaL_reg ifilesystem_m[] = {
+static const luaL_Reg ifilesystem_m[] = {
{0,0},
};
diff --git a/src/client/lua_api/phys/cbcharactercontroller.cpp b/src/client/lua_api/phys/cbcharactercontroller.cpp
index e116ee8..c26dd7b 100644
--- a/src/client/lua_api/phys/cbcharactercontroller.cpp
+++ b/src/client/lua_api/phys/cbcharactercontroller.cpp
@@ -89,7 +89,7 @@ static int newcbcharactercontroller(lua_State* L){//
//int cbchar
-static const luaL_reg cbcharactercontroller_m[] = {
+static const luaL_Reg cbcharactercontroller_m[] = {
//{"setpos", cbcharsetpos},//overload
//{"getpos", cbchargetpos},
//{"getgravity", cbphysgetgravity},
diff --git a/src/client/lua_api/phys/cbphysbox.cpp b/src/client/lua_api/phys/cbphysbox.cpp
index 5fcba3b..0dbb95c 100644
--- a/src/client/lua_api/phys/cbphysbox.cpp
+++ b/src/client/lua_api/phys/cbphysbox.cpp
@@ -157,7 +157,7 @@ int cbsetmaterial(lua_State* L){
return 0;
}
-static const luaL_reg cbphysbox_m[] = {
+static const luaL_Reg cbphysbox_m[] = {
{"setpos", cbphyssetpos},//overload
{"getpos", cbphysgetpos},
{0, 0},
diff --git a/src/client/lua_api/phys/cbphysmodel.cpp b/src/client/lua_api/phys/cbphysmodel.cpp
index e09c62e..c48948a 100644
--- a/src/client/lua_api/phys/cbphysmodel.cpp
+++ b/src/client/lua_api/phys/cbphysmodel.cpp
@@ -252,12 +252,12 @@ static int newbphysmodel(lua_State* L){
return 1;
}
-static const luaL_reg bphysmodel_f[] = {
+static const luaL_Reg bphysmodel_f[] = {
{"newphysmodel", newbphysmodel},
{0,0},
};
-static const luaL_reg bphysmodel_m[] = {
+static const luaL_Reg bphysmodel_m[] = {
{0, 0},
};
diff --git a/src/client/lua_api/scene/icamera.cpp b/src/client/lua_api/scene/icamera.cpp
index 34b3447..8a129b5 100644
--- a/src/client/lua_api/scene/icamera.cpp
+++ b/src/client/lua_api/scene/icamera.cpp
@@ -192,18 +192,18 @@ static int icamerasettarget(lua_State *L){
return 0;
}
-static const luaL_reg icamera_m[] = {
+static const luaL_Reg icamera_m[] = {
{"bindtarget", icamerabindtarget},
{"gettarget", icameragettarget},
{"settarget", icamerasettarget},
{0,0},
};
-static const luaL_reg imayacamera_m[] = {
+static const luaL_Reg imayacamera_m[] = {
{0,0},
};
-static const luaL_reg ifpscamera_m[] = {
+static const luaL_Reg ifpscamera_m[] = {
{0,0},
};
diff --git a/src/client/lua_api/scene/igeneric.cpp b/src/client/lua_api/scene/igeneric.cpp
index a0c33b3..bd6973c 100644
--- a/src/client/lua_api/scene/igeneric.cpp
+++ b/src/client/lua_api/scene/igeneric.cpp
@@ -269,7 +269,7 @@ int isceneremove(lua_State *L){
return 1;
}
-extern const luaL_reg igeneric_m[] = {
+extern const luaL_Reg igeneric_m[] = {
{"getpos", iscenegetpos},
{"setpos", iscenesetpos},
{"getang", iscenegetangle},
diff --git a/src/client/lua_api/scene/igeneric.hpp b/src/client/lua_api/scene/igeneric.hpp
index 9e3d6f6..f015918 100644
--- a/src/client/lua_api/scene/igeneric.hpp
+++ b/src/client/lua_api/scene/igeneric.hpp
@@ -15,5 +15,5 @@ int iscenegetangle(lua_State* L);
int iscenesetangle(lua_State* L);
int iscenesetmaterial(lua_State* L);
-extern const luaL_reg igeneric_m[];
+extern const luaL_Reg igeneric_m[];
#endif
diff --git a/src/client/lua_api/scene/ilight.cpp b/src/client/lua_api/scene/ilight.cpp
index e405443..ad3b440 100644
--- a/src/client/lua_api/scene/ilight.cpp
+++ b/src/client/lua_api/scene/ilight.cpp
@@ -80,7 +80,7 @@ int settype(lua_State *L){
return 0;
}
-static const luaL_reg ilight_m[] = {
+static const luaL_Reg ilight_m[] = {
{"settype", settype},
{0, 0},
};
diff --git a/src/client/lua_api/scene/imesh.cpp b/src/client/lua_api/scene/imesh.cpp
index 479da15..b3d32df 100644
--- a/src/client/lua_api/scene/imesh.cpp
+++ b/src/client/lua_api/scene/imesh.cpp
@@ -79,7 +79,7 @@ int newiscenecube(lua_State* L){//{v3 size}, {v3 origin}
return 1;
}
-static const luaL_reg imesh_m[] = {
+static const luaL_Reg imesh_m[] = {
//{"setMaterial", iscenesetmaterial},
//{"getpos", iscenegetpos},
//{"setpos", iscenesetpos},
@@ -87,7 +87,7 @@ static const luaL_reg imesh_m[] = {
{0, 0},
};
-static const luaL_reg icube_m[] = {
+static const luaL_Reg icube_m[] = {
{0,0},
};
diff --git a/src/client/lua_api/video/iimage.cpp b/src/client/lua_api/video/iimage.cpp
index 3655b64..31b3156 100644
--- a/src/client/lua_api/video/iimage.cpp
+++ b/src/client/lua_api/video/iimage.cpp
@@ -145,7 +145,7 @@ int getiimagedimensions(lua_State *L){
return 1;
}
-static const luaL_reg iimage_m[] = {
+static const luaL_Reg iimage_m[] = {
{"setpixel", setiimagepixel},
{"getpixel", getiimagepixel},
{"getdimensions", getiimagedimensions},
diff --git a/src/client/lua_api/video/smaterial.cpp b/src/client/lua_api/video/smaterial.cpp
index 4ed6a46..a7a9851 100644
--- a/src/client/lua_api/video/smaterial.cpp
+++ b/src/client/lua_api/video/smaterial.cpp
@@ -74,7 +74,7 @@ int setFlag(lua_State* L){
return 0;
}
-static const luaL_reg smaterial_m[] = {
+static const luaL_Reg smaterial_m[] = {
{"settexture", setTexture},
{"setflag", setFlag},
{0,0},
diff --git a/src/client/main.cpp b/src/client/main.cpp
index d6184e0..94e566e 100644
--- a/src/client/main.cpp
+++ b/src/client/main.cpp
@@ -126,7 +126,7 @@ int main(int argc, char *argv[]){
// Initialize bullet
phys_genesis();
-
+ //printf("Phys genisis complete\n");
//Create a new lua state, this gets shared everywhere
//Set the path for lua
putenv((char*)"LUA_PATH=../data/?.lua");
@@ -178,14 +178,14 @@ int main(int argc, char *argv[]){
printf("[OK]\n");
printf("All libs loaded.\n");
//Sets the global event handeler
- printf("Creating event receiver\n");
+ //printf("Creating event receiver\n");
GlobalEventReceiver ger = GlobalEventReceiver(device);
- printf("Created event receiver\n");
+ //printf("Created event receiver\n");
device->setEventReceiver(&ger);
assert(lua_gettop(L) == 0);
pusherrorfunc(L);//errfunc
int err = luaL_loadfile(state,"init.lua");//errfunc,init()
- printf("Error loading init.lua: %d\n",err);
+ //printf("Error loading init.lua: %d\n",err);
switch(err){//errmsg or nothing
case 0:
break; //no error
diff --git a/src/shared/lua_api/phys/bcharactercontroller.cpp b/src/shared/lua_api/phys/bcharactercontroller.cpp
index 09941c8..1567a84 100644
--- a/src/shared/lua_api/phys/bcharactercontroller.cpp
+++ b/src/shared/lua_api/phys/bcharactercontroller.cpp
@@ -265,7 +265,7 @@ int bcharactersetvelocityforinterval(lua_State *L){
return 0;
}
-extern const luaL_reg bcharactercontroller_m[] = {
+extern const luaL_Reg bcharactercontroller_m[] = {
{"setwalkdir", bcharsetwalkdirection},
{"remove", delbcharactercontroller},
{"getvelocity", bcharactergetvelocity},
diff --git a/src/shared/lua_api/phys/bcharactercontroller.hpp b/src/shared/lua_api/phys/bcharactercontroller.hpp
index 02e5afb..631e6b4 100644
--- a/src/shared/lua_api/phys/bcharactercontroller.hpp
+++ b/src/shared/lua_api/phys/bcharactercontroller.hpp
@@ -9,4 +9,4 @@ extern "C" {
void bcharactercontroller_register(lua_State* L);
void makenewbcharactercontroller(lua_State* L);
-extern const luaL_reg bcharactercontroller_m[];
+extern const luaL_Reg bcharactercontroller_m[];
diff --git a/src/shared/lua_api/phys/bcollider.cpp b/src/shared/lua_api/phys/bcollider.cpp
index caefd3e..81741e8 100644
--- a/src/shared/lua_api/phys/bcollider.cpp
+++ b/src/shared/lua_api/phys/bcollider.cpp
@@ -86,7 +86,7 @@ int getpos(lua_State *L){
return 1;
}
-extern const luaL_reg bcollider_m[] = {
+extern const luaL_Reg bcollider_m[] = {
{"activate", activate},
{"getpos", getpos},
{"setpos", setpos},
diff --git a/src/shared/lua_api/phys/bcollider.hpp b/src/shared/lua_api/phys/bcollider.hpp
index f5164b7..59ac92c 100644
--- a/src/shared/lua_api/phys/bcollider.hpp
+++ b/src/shared/lua_api/phys/bcollider.hpp
@@ -4,4 +4,4 @@ extern "C" {
#include <lualib.h>
}
-extern const luaL_reg bcollider_m[];
+extern const luaL_Reg bcollider_m[];
diff --git a/src/shared/lua_api/phys/bghostobject.cpp b/src/shared/lua_api/phys/bghostobject.cpp
index 5657b5f..44fa9da 100644
--- a/src/shared/lua_api/phys/bghostobject.cpp
+++ b/src/shared/lua_api/phys/bghostobject.cpp
@@ -213,7 +213,7 @@ int bghostnumoverlapping(lua_State *L){
return 1;
}
-static const luaL_reg bghost_m[] = {
+static const luaL_Reg bghost_m[] = {
{"getpos", bghostgetpos},
{"setpos", bghostsetpos},
{"getoverlapping", bghostoverlapping},
diff --git a/src/shared/lua_api/phys/bhingeconstraint.cpp b/src/shared/lua_api/phys/bhingeconstraint.cpp
index 5045cb7..b6dae80 100644
--- a/src/shared/lua_api/phys/bhingeconstraint.cpp
+++ b/src/shared/lua_api/phys/bhingeconstraint.cpp
@@ -34,7 +34,7 @@ int newbhingeconstraint(lua_State *L){
return 0;
}
-static const luaL_reg hingeconstraint_m[] = {
+static const luaL_Reg hingeconstraint_m[] = {
// {"delete", delbphysbox},//client side delete needs to delete the visual representation
{0, 0},
};
diff --git a/src/shared/lua_api/phys/bphysbuffer.cpp b/src/shared/lua_api/phys/bphysbuffer.cpp
index 074f506..8f2a518 100644
--- a/src/shared/lua_api/phys/bphysbuffer.cpp
+++ b/src/shared/lua_api/phys/bphysbuffer.cpp
@@ -168,14 +168,14 @@ extern core::list<btRigidBody*> Objects;
//}
-static const luaL_reg bphysbuffer_f[] = {
+static const luaL_Reg bphysbuffer_f[] = {
//{"new", newbphysmodel},
// {"gethandeler", guigethandeler},
// {"sethandeler", guisethandeler},
{0,0},
};
-static const luaL_reg bphysbuffer_m[] = {
+static const luaL_Reg bphysbuffer_m[] = {
//{"setmaterial", iscenesetmaterial},
//{"getpos", bphysgetpos},
//{"setpos", bphyssetpos},
diff --git a/src/shared/lua_api/phys/bphysgeneric.cpp b/src/shared/lua_api/phys/bphysgeneric.cpp
index 3f2114e..9c6f8cc 100644
--- a/src/shared/lua_api/phys/bphysgeneric.cpp
+++ b/src/shared/lua_api/phys/bphysgeneric.cpp
@@ -301,7 +301,7 @@ A callback used to detect collisions
//return 0;
//}
-extern const luaL_reg brigidbody_m[] = {
+extern const luaL_Reg brigidbody_m[] = {
{"setgravity", setgravity},
{"applyforce", applyforce},
{"applyimpulse", applyimpulse},
diff --git a/src/shared/lua_api/phys/bphysgeneric.hpp b/src/shared/lua_api/phys/bphysgeneric.hpp
index 6d3ef70..f7ea302 100644
--- a/src/shared/lua_api/phys/bphysgeneric.hpp
+++ b/src/shared/lua_api/phys/bphysgeneric.hpp
@@ -15,4 +15,4 @@ int activate(lua_State *L);
int getvelocity(lua_State *L);
int setvelocity(lua_State *L);
-extern const luaL_reg brigidbody_m[];
+extern const luaL_Reg brigidbody_m[];
diff --git a/src/shared/lua_api/phys/bphysmodel.cpp b/src/shared/lua_api/phys/bphysmodel.cpp
index e5a9949..45d6a49 100644
--- a/src/shared/lua_api/phys/bphysmodel.cpp
+++ b/src/shared/lua_api/phys/bphysmodel.cpp
@@ -204,12 +204,12 @@ static int newbphysmodel(lua_State* L){
return 1;
}
-static const luaL_reg bphysmodel_f[] = {
+static const luaL_Reg bphysmodel_f[] = {
{"newphysmodel", newbphysmodel},
{0,0},
};
-static const luaL_reg bphysmodel_m[] = {
+static const luaL_Reg bphysmodel_m[] = {
{0, 0},
};
diff --git a/src/shared/lua_api/phys/bshape.cpp b/src/shared/lua_api/phys/bshape.cpp
index f7d73d3..602d527 100644
--- a/src/shared/lua_api/phys/bshape.cpp
+++ b/src/shared/lua_api/phys/bshape.cpp
@@ -27,12 +27,12 @@ static int newboxshape(lua_State* L){
return 1;
}
-static const luaL_reg bshape_f[] = {
+static const luaL_Reg bshape_f[] = {
{"newboxshape", newboxshape},
{0,0},
};
-static const luaL_reg bshape_m[] = {
+static const luaL_Reg bshape_m[] = {
{0,0},
};