mirror of
https://github.com/edubart/otclient.git
synced 2025-12-21 16:07:12 +01:00
reorganize all constants and place them into namespaces
This commit is contained in:
@@ -42,7 +42,7 @@ void LuaInterface::init()
|
||||
createLuaState();
|
||||
|
||||
// check if demangle_type is working as expected
|
||||
assert(fw::demangle_type<LuaObject>() == "LuaObject");
|
||||
assert(Fw::demangleType<LuaObject>() == "LuaObject");
|
||||
|
||||
// register LuaObject, the base of all other objects
|
||||
registerClass<LuaObject>();
|
||||
@@ -147,12 +147,12 @@ void LuaInterface::registerClassMemberField(const std::string& className,
|
||||
|
||||
if(getFunction) {
|
||||
pushCppFunction(getFunction);
|
||||
setField(fw::mkstr("get_", field));
|
||||
setField(Fw::mkstr("get_", field));
|
||||
}
|
||||
|
||||
if(setFunction) {
|
||||
pushCppFunction(setFunction);
|
||||
setField(fw::mkstr("set_", field));
|
||||
setField(Fw::mkstr("set_", field));
|
||||
}
|
||||
|
||||
pop();
|
||||
@@ -295,7 +295,7 @@ void LuaInterface::loadFunction(const std::string& buffer, const std::string& so
|
||||
// gets the function contained in that buffer
|
||||
if(boost::starts_with(buffer, "function")) {
|
||||
// evaluate the function
|
||||
std::string buf = fw::mkstr("__func = ", buffer);
|
||||
std::string buf = Fw::mkstr("__func = ", buffer);
|
||||
loadBuffer(buf, source);
|
||||
safeCall();
|
||||
|
||||
@@ -317,7 +317,7 @@ void LuaInterface::evaluateExpression(const std::string& expression, const std::
|
||||
{
|
||||
// evaluates the expression
|
||||
if(!expression.empty()) {
|
||||
std::string buffer = fw::mkstr("__exp = (", expression, ")");
|
||||
std::string buffer = Fw::mkstr("__exp = (", expression, ")");
|
||||
loadBuffer(buffer, source);
|
||||
safeCall();
|
||||
|
||||
@@ -917,7 +917,7 @@ void LuaInterface::pushObject(const LuaObjectPtr& obj)
|
||||
new(newUserdata(sizeof(LuaObjectPtr))) LuaObjectPtr(obj);
|
||||
|
||||
// set the userdata metatable
|
||||
getGlobal(fw::mkstr(obj->getLuaObjectName(), "_mt"));
|
||||
getGlobal(Fw::mkstr(obj->getLuaObjectName(), "_mt"));
|
||||
assert(!isNil());
|
||||
setMetatable();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user