-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathLuaBindingsMisc.cpp
More file actions
56 lines (46 loc) · 2.74 KB
/
LuaBindingsMisc.cpp
File metadata and controls
56 lines (46 loc) · 2.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Make sure that binding definition files are always set to NOT use pre-compiled headers and conformance mode (/permissive) otherwise everything will be on fire!
#include "LuaBindingRegisterDefinitions.h"
using namespace RTE;
LuaBindingRegisterFunctionDefinitionForType(MiscLuaBindings, AlarmEvent) {
return luabind::class_<AlarmEvent>("AlarmEvent")
.def(luabind::constructor<>())
.def(luabind::constructor<const Vector&, int, float>())
.def_readwrite("ScenePos", &AlarmEvent::m_ScenePos)
.def_readwrite("Team", &AlarmEvent::m_Team)
.def_readwrite("Range", &AlarmEvent::m_Range);
}
LuaBindingRegisterFunctionDefinitionForType(MiscLuaBindings, Directions) {
return luabind::class_<directions>("Directions")
.enum_("Directions")[luabind::value("None", Directions::None),
luabind::value("Up", Directions::Up),
luabind::value("Down", Directions::Down),
luabind::value("Left", Directions::Left),
luabind::value("Right", Directions::Right),
luabind::value("Any", Directions::Any)];
}
LuaBindingRegisterFunctionDefinitionForType(MiscLuaBindings, DrawBlendMode) {
return luabind::class_<blend_modes>("DrawBlendMode")
.enum_("DrawBlendMode")[luabind::value("NoBlend", DrawBlendMode::NoBlend),
luabind::value("Burn", DrawBlendMode::BlendBurn),
luabind::value("Color", DrawBlendMode::BlendColor),
luabind::value("Difference", DrawBlendMode::BlendDifference),
luabind::value("Dissolve", DrawBlendMode::BlendDissolve),
luabind::value("Dodge", DrawBlendMode::BlendDodge),
luabind::value("Invert", DrawBlendMode::BlendInvert),
luabind::value("Luminance", DrawBlendMode::BlendLuminance),
luabind::value("Multiply", DrawBlendMode::BlendMultiply),
luabind::value("Saturation", DrawBlendMode::BlendSaturation),
luabind::value("Screen", DrawBlendMode::BlendScreen),
luabind::value("Transparency", DrawBlendMode::BlendTransparency),
luabind::value("BlendModeCount", DrawBlendMode::BlendModeCount)];
}
LuaBindingRegisterFunctionDefinitionForType(MiscLuaBindings, DrawDepth) {
return luabind::class_<draw_depths>("DrawDepth")
.enum_("DrawDepth")[
luabind::value("Default", c_DefaultDrawDepth),
luabind::value("GUI", c_GuiDepth),
luabind::value("Primitive", c_PrimitiveDepth),
luabind::value("TerrainBackground", c_TerrainBGDepth),
luabind::value("Background", c_BackgroundDepth)
];
}