-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathLuaBindingsPrimitives.cpp
More file actions
119 lines (86 loc) · 6.13 KB
/
LuaBindingsPrimitives.cpp
File metadata and controls
119 lines (86 loc) · 6.13 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
// 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(PrimitiveLuaBindings, GraphicalPrimitive) {
return luabind::class_<GraphicalPrimitive>("GraphicalPrimitive");
}
LuaBindingRegisterFunctionDefinitionForType(PrimitiveLuaBindings, LinePrimitive) {
return luabind::class_<LinePrimitive, GraphicalPrimitive>("LinePrimitive")
.def(luabind::constructor<int, const Vector&, const Vector&, unsigned char>())
.def(luabind::constructor<int, const Vector&, const Vector&, float, unsigned char>())
.def(luabind::constructor<int, const Vector&, const Vector&, float, unsigned char, float>());
}
LuaBindingRegisterFunctionDefinitionForType(PrimitiveLuaBindings, ArcPrimitive) {
return luabind::class_<ArcPrimitive, GraphicalPrimitive>("ArcPrimitive")
.def(luabind::constructor<int, const Vector&, float, float, int, int, unsigned char>())
.def(luabind::constructor<int, const Vector&, float, float, int, int, unsigned char, float>());
}
LuaBindingRegisterFunctionDefinitionForType(PrimitiveLuaBindings, SplinePrimitive) {
return luabind::class_<SplinePrimitive, GraphicalPrimitive>("SplinePrimitive")
.def(luabind::constructor<int, const Vector&, const Vector&, const Vector&, const Vector&, unsigned char>())
.def(luabind::constructor<int, const Vector&, const Vector&, const Vector&, const Vector&, unsigned char, float>());
}
LuaBindingRegisterFunctionDefinitionForType(PrimitiveLuaBindings, BoxPrimitive) {
return luabind::class_<BoxPrimitive, GraphicalPrimitive>("BoxPrimitive")
.def(luabind::constructor<int, const Vector&, const Vector&, unsigned char>())
.def(luabind::constructor<int, const Vector&, const Vector&, unsigned char, float>());
}
LuaBindingRegisterFunctionDefinitionForType(PrimitiveLuaBindings, BoxFillPrimitive) {
return luabind::class_<BoxFillPrimitive, GraphicalPrimitive>("BoxFillPrimitive")
.def(luabind::constructor<int, const Vector&, const Vector&, unsigned char>())
.def(luabind::constructor<int, const Vector&, const Vector&, unsigned char, float>());
}
LuaBindingRegisterFunctionDefinitionForType(PrimitiveLuaBindings, RoundedBoxPrimitive) {
return luabind::class_<RoundedBoxPrimitive, GraphicalPrimitive>("RoundedBoxPrimitive")
.def(luabind::constructor<int, const Vector&, const Vector&, int, unsigned char>())
.def(luabind::constructor<int, const Vector&, const Vector&, int, unsigned char, float>());
}
LuaBindingRegisterFunctionDefinitionForType(PrimitiveLuaBindings, RoundedBoxFillPrimitive) {
return luabind::class_<RoundedBoxFillPrimitive, GraphicalPrimitive>("RoundedBoxFillPrimitive")
.def(luabind::constructor<int, const Vector&, const Vector&, int, unsigned char>())
.def(luabind::constructor<int, const Vector&, const Vector&, int, unsigned char, float>());
}
LuaBindingRegisterFunctionDefinitionForType(PrimitiveLuaBindings, CirclePrimitive) {
return luabind::class_<CirclePrimitive, GraphicalPrimitive>("CirclePrimitive")
.def(luabind::constructor<int, const Vector&, int, unsigned char>())
.def(luabind::constructor<int, const Vector&, int, unsigned char, float>());
}
LuaBindingRegisterFunctionDefinitionForType(PrimitiveLuaBindings, CircleFillPrimitive) {
return luabind::class_<CircleFillPrimitive, GraphicalPrimitive>("CircleFillPrimitive")
.def(luabind::constructor<int, const Vector&, int, unsigned char>())
.def(luabind::constructor<int, const Vector&, int, unsigned char, float>());
}
LuaBindingRegisterFunctionDefinitionForType(PrimitiveLuaBindings, EllipsePrimitive) {
return luabind::class_<EllipsePrimitive, GraphicalPrimitive>("EllipsePrimitive")
.def(luabind::constructor<int, const Vector&, int, int, unsigned char>())
.def(luabind::constructor<int, const Vector&, int, int, unsigned char, float>());
}
LuaBindingRegisterFunctionDefinitionForType(PrimitiveLuaBindings, EllipseFillPrimitive) {
return luabind::class_<EllipseFillPrimitive, GraphicalPrimitive>("EllipseFillPrimitive")
.def(luabind::constructor<int, const Vector&, int, int, unsigned char>())
.def(luabind::constructor<int, const Vector&, int, int, unsigned char, float>());
}
LuaBindingRegisterFunctionDefinitionForType(PrimitiveLuaBindings, TrianglePrimitive) {
return luabind::class_<TrianglePrimitive, GraphicalPrimitive>("TrianglePrimitive")
.def(luabind::constructor<int, const Vector&, const Vector&, const Vector&, unsigned char>())
.def(luabind::constructor<int, const Vector&, const Vector&, const Vector&, unsigned char, float>());
}
LuaBindingRegisterFunctionDefinitionForType(PrimitiveLuaBindings, TriangleFillPrimitive) {
return luabind::class_<TriangleFillPrimitive, GraphicalPrimitive>("TriangleFillPrimitive")
.def(luabind::constructor<int, const Vector&, const Vector&, const Vector&, unsigned char>())
.def(luabind::constructor<int, const Vector&, const Vector&, const Vector&, unsigned char, float>());
}
LuaBindingRegisterFunctionDefinitionForType(PrimitiveLuaBindings, TextPrimitive) {
return luabind::class_<TextPrimitive, GraphicalPrimitive>("TextPrimitive")
.def(luabind::constructor<int, const Vector&, const std::string&, bool, int, float>())
.def(luabind::constructor<int, const Vector&, const std::string&, bool, int, float, float>());
}
LuaBindingRegisterFunctionDefinitionForType(PrimitiveLuaBindings, BitmapPrimitive) {
return luabind::class_<BitmapPrimitive, GraphicalPrimitive>("BitmapPrimitive")
.def(luabind::constructor<int, const Vector&, const MOSprite*, float, unsigned int, float, bool, bool>())
.def(luabind::constructor<int, const Vector&, const std::string&, float, float, bool, bool>())
.def(luabind::constructor<int, const Vector&, const MOSprite*, float, unsigned int, bool, bool>())
.def(luabind::constructor<int, const Vector&, const MOSprite*, float, unsigned int, bool, bool, float>())
.def(luabind::constructor<int, const Vector&, const std::string&, float, bool, bool>())
.def(luabind::constructor<int, const Vector&, const std::string&, float, bool, bool, float>());
}