BEAWARE all game functionality is disabled with this commit for a while

* rework client modules
* hide main window when loading
* remake top menu functions
* rework modules autoload
* improve path resolving for otml and lua
* move core_widgets to core_lib
* fix tooltip issues
* split some styles
* add bit32 lua library
* fix assert issues
* fix compilation on linux 32 systems
* rework gcc compile options
* renable and fix some warnings
* remove unused constants
* speedup sprite cache
* move UIGame to lua (not funcional yet)
* fix a lot of issues in x11 window
* fix crash handler
* add some warnings do uiwidget
and much more...
This commit is contained in:
Eduardo Bart
2012-02-20 00:27:08 -02:00
parent 96358b317d
commit e03bf33f58
201 changed files with 1443 additions and 707 deletions

View File

@@ -26,6 +26,8 @@
#include <framework/core/resourcemanager.h>
#include <lua.hpp>
#include <framework/thirdparty/lbitlib-5.2.0-backport4.h>
LuaInterface g_lua;
LuaInterface::LuaInterface()
@@ -590,6 +592,9 @@ void LuaInterface::createLuaState()
// load lua standard libraries
luaL_openlibs(L);
// load bit32 lib for bitwise operations
luaopen_bit32(L);
// creates weak table
newTable();
@@ -812,7 +817,9 @@ void LuaInterface::getEnv(int index)
void LuaInterface::setEnv(int index)
{
assert(hasIndex(index));
assert(lua_setfenv(L, index) == 1);
int ret;
ret = lua_setfenv(L, index);
assert(ret == 1);
}
void LuaInterface::getTable(int index)

View File

@@ -191,7 +191,8 @@ bool luavalue_cast(int index, std::function<void(Args...)>& func) {
try {
if(g_lua.isFunction()) {
g_lua.polymorphicPush(args...);
assert(g_lua.safeCall(sizeof...(Args)) == 0);
int rets = g_lua.safeCall(sizeof...(Args));
g_lua.pop(rets);
} else {
throw LuaException("attempt to call an expired lua function from C++,"
"did you forget to hold a reference for that function?", 0);