1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Less ugly API declarations

This commit is contained in:
AlexVinS
2021-02-16 17:07:30 +03:00
parent ec6f7b88fe
commit 6d245a7821
59 changed files with 693 additions and 827 deletions

View File

@ -22,15 +22,13 @@ namespace api
{
VCMI_REGISTER_CORE_SCRIPT_API(ObjectInstanceProxy, "ObjectInstance");
const std::vector<ObjectInstanceProxy::RegType> ObjectInstanceProxy::REGISTER = {};
const std::vector<ObjectInstanceProxy::CustomRegType> ObjectInstanceProxy::REGISTER_CUSTOM =
{
{"getOwner", LuaMethodWrapper<CGObjectInstance, PlayerColor(IObjectInterface:: *)()const, &IObjectInterface::getOwner>::invoke, false},
{"getObjGroupIndex", LuaMethodWrapper<CGObjectInstance, int32_t(IObjectInterface:: *)()const, &IObjectInterface::getObjGroupIndex>::invoke, false},
{"getObjTypeIndex", LuaMethodWrapper<CGObjectInstance, int32_t(IObjectInterface:: *)()const, &IObjectInterface::getObjTypeIndex>::invoke, false},
{"getVisitablePosition", LuaMethodWrapper<CGObjectInstance, int3(IObjectInterface:: *)()const, &IObjectInterface::visitablePos>::invoke, false},
{"getPosition", LuaMethodWrapper<CGObjectInstance, int3(IObjectInterface:: *)()const, &IObjectInterface::getPosition>::invoke, false},
{"getOwner", LuaMethodWrapper<CGObjectInstance, decltype(&IObjectInterface::getOwner), &IObjectInterface::getOwner>::invoke, false},
{"getObjGroupIndex", LuaMethodWrapper<CGObjectInstance, decltype(&IObjectInterface::getObjGroupIndex), &IObjectInterface::getObjGroupIndex>::invoke, false},
{"getObjTypeIndex", LuaMethodWrapper<CGObjectInstance, decltype(&IObjectInterface::getObjTypeIndex), &IObjectInterface::getObjTypeIndex>::invoke, false},
{"getVisitablePosition", LuaMethodWrapper<CGObjectInstance, decltype(&IObjectInterface::visitablePos), &IObjectInterface::visitablePos>::invoke, false},
{"getPosition", LuaMethodWrapper<CGObjectInstance, decltype(IObjectInterface::getPosition), &IObjectInterface::getPosition>::invoke, false},
};
}