28 using namespace AngelScript;
50 result = engine->RegisterEnum(
"RoadType");
ROR_ASSERT(result >= 0);
60 result = engine->RegisterEnum(
"TextureFit");
ROR_ASSERT(result >= 0);
78 result = engine->RegisterObjectBehaviour(
"ProceduralPointClass", asBEHAVE_FACTORY,
"ProceduralPointClass@+ f()", asFUNCTION(
ProceduralPointFactory), asCALL_CDECL);
ROR_ASSERT(result >= 0);
80 result = engine->RegisterObjectMethod(
"ProceduralPointClass",
"vector3& get_position() property", asFUNCTIONPR([](
ProceduralPoint*
self) -> Ogre::Vector3& {
return self->position; }, (
ProceduralPoint*), Ogre::Vector3&), asCALL_CDECL_OBJFIRST);
ROR_ASSERT(result >= 0);
81 result = engine->RegisterObjectMethod(
"ProceduralPointClass",
"quaternion& get_rotation() property", asFUNCTIONPR([](
ProceduralPoint*
self) -> Ogre::Quaternion& {
return self->rotation; }, (
ProceduralPoint*), Ogre::Quaternion&), asCALL_CDECL_OBJFIRST);
ROR_ASSERT(result >= 0);
82 result = engine->RegisterObjectMethod(
"ProceduralPointClass",
"float get_width() property", asFUNCTIONPR([](
ProceduralPoint*
self) {
return self->width; }, (
ProceduralPoint*),
float), asCALL_CDECL_OBJFIRST);
ROR_ASSERT(result >= 0);
83 result = engine->RegisterObjectMethod(
"ProceduralPointClass",
"float get_border_width() property", asFUNCTIONPR([](
ProceduralPoint*
self) {
return self->bwidth; }, (
ProceduralPoint*),
float), asCALL_CDECL_OBJFIRST);
ROR_ASSERT(result >= 0);
84 result = engine->RegisterObjectMethod(
"ProceduralPointClass",
"float get_border_height() property", asFUNCTIONPR([](
ProceduralPoint*
self) {
return self->bheight; }, (
ProceduralPoint*),
float), asCALL_CDECL_OBJFIRST);
ROR_ASSERT(result >= 0);
86 result = engine->RegisterObjectMethod(
"ProceduralPointClass",
"int get_pillar_type() property", asFUNCTIONPR([](
ProceduralPoint*
self) {
return self->pillartype; }, (
ProceduralPoint*),
int), asCALL_CDECL_OBJFIRST);
ROR_ASSERT(result >= 0);
88 result = engine->RegisterObjectMethod(
"ProceduralPointClass",
"void set_position(const vector3& in pos) property", asFUNCTIONPR([](
ProceduralPoint*
self,
const Ogre::Vector3& pos) {
self->position = pos; }, (
ProceduralPoint*,
const Ogre::Vector3&),
void), asCALL_CDECL_OBJFIRST);
ROR_ASSERT(result >= 0);
89 result = engine->RegisterObjectMethod(
"ProceduralPointClass",
"void set_rotation(const quaternion& in rot) property", asFUNCTIONPR([](
ProceduralPoint*
self,
const Ogre::Quaternion& rot) {
self->rotation = rot; }, (
ProceduralPoint*,
const Ogre::Quaternion&),
void), asCALL_CDECL_OBJFIRST);
ROR_ASSERT(result >= 0);
90 result = engine->RegisterObjectMethod(
"ProceduralPointClass",
"void set_width(float width) property", asFUNCTIONPR([](
ProceduralPoint*
self,
float width) {
self->width = width; }, (
ProceduralPoint*, float),
void), asCALL_CDECL_OBJFIRST);
ROR_ASSERT(result >= 0);
91 result = engine->RegisterObjectMethod(
"ProceduralPointClass",
"void set_border_width(float bwidth) property", asFUNCTIONPR([](
ProceduralPoint*
self,
float bwidth) {
self->bwidth = bwidth; }, (
ProceduralPoint*, float),
void), asCALL_CDECL_OBJFIRST);
ROR_ASSERT(result >= 0);
92 result = engine->RegisterObjectMethod(
"ProceduralPointClass",
"void set_border_height(float bheight) property", asFUNCTIONPR([](
ProceduralPoint*
self,
float bheight) {
self->bheight = bheight; }, (
ProceduralPoint*, float),
void), asCALL_CDECL_OBJFIRST);
ROR_ASSERT(result >= 0);
94 result = engine->RegisterObjectMethod(
"ProceduralPointClass",
"void set_pillar_type(int type) property", asFUNCTIONPR([](
ProceduralPoint*
self,
int type) {
self->pillartype = type; }, (
ProceduralPoint*, int),
void), asCALL_CDECL_OBJFIRST);
ROR_ASSERT(result >= 0);
99 result = engine->RegisterObjectBehaviour(
"ProceduralRoadClass", asBEHAVE_FACTORY,
"ProceduralRoadClass@+ f()", asFUNCTION(
ProceduralRoadFactory), asCALL_CDECL);
ROR_ASSERT(result >= 0);
100 result = engine->RegisterObjectMethod(
"ProceduralRoadClass",
"void addBlock(vector3 pos, quaternion rot, RoadType type, float width, float border_width, float border_height, int pillar_type = 1)", asMETHOD(
RoR::ProceduralRoad, addBlock), asCALL_THISCALL);
ROR_ASSERT(result >= 0);
101 result = engine->RegisterObjectMethod(
"ProceduralRoadClass",
"void addQuad(vector3 p1, vector3 p2, vector3 p3, vector3 p4, TextureFit texfit, vector3 pos, vector3 lastpos, float width, bool flip = false)", asMETHOD(
RoR::ProceduralRoad, addQuad), asCALL_THISCALL);
ROR_ASSERT(result >= 0);
102 result = engine->RegisterObjectMethod(
"ProceduralRoadClass",
"void addCollisionQuad(vector3 p1, vector3 p2, vector3 p3, vector3 p4, const string&in gm_name, bool flip = false)", asMETHODPR(
RoR::ProceduralRoad, addCollisionQuad, (Ogre::Vector3, Ogre::Vector3, Ogre::Vector3, Ogre::Vector3, std::string
const&,
bool),
void), asCALL_THISCALL);
ROR_ASSERT(result >= 0);
103 result = engine->RegisterObjectMethod(
"ProceduralRoadClass",
"void createMesh()", asMETHOD(
RoR::ProceduralRoad, createMesh), asCALL_THISCALL);
ROR_ASSERT(result >= 0);
104 result = engine->RegisterObjectMethod(
"ProceduralRoadClass",
"void finish()", asMETHOD(
RoR::ProceduralRoad, finish), asCALL_THISCALL);
ROR_ASSERT(result >= 0);
105 result = engine->RegisterObjectMethod(
"ProceduralRoadClass",
"void setCollisionEnabled(bool v)", asMETHOD(
RoR::ProceduralRoad, setCollisionEnabled), asCALL_THISCALL);
ROR_ASSERT(result >= 0);
110 result = engine->RegisterObjectBehaviour(
"ProceduralObjectClass", asBEHAVE_FACTORY,
"ProceduralObjectClass@+ f()", asFUNCTION(
ProceduralObjectFactory), asCALL_CDECL);
ROR_ASSERT(result >= 0);
111 result = engine->RegisterObjectMethod(
"ProceduralObjectClass",
"string getName()", asMETHOD(
RoR::ProceduralObject, getName), asCALL_THISCALL);
ROR_ASSERT(result >= 0);
112 result = engine->RegisterObjectMethod(
"ProceduralObjectClass",
"void setName(const string&in)", asMETHOD(
RoR::ProceduralObject, setName), asCALL_THISCALL);
ROR_ASSERT(result >= 0);
113 result = engine->RegisterObjectMethod(
"ProceduralObjectClass",
"void addPoint(ProceduralPointClassPtr @)", asMETHOD(
RoR::ProceduralObject, addPoint), asCALL_THISCALL);
ROR_ASSERT(result >= 0);
114 result = engine->RegisterObjectMethod(
"ProceduralObjectClass",
"void insertPoint(int pos, ProceduralPointClassPtr @)", asMETHOD(
RoR::ProceduralObject, insertPoint), asCALL_THISCALL);
ROR_ASSERT(result >= 0);
115 result = engine->RegisterObjectMethod(
"ProceduralObjectClass",
"void deletePoint(int pos)", asMETHOD(
RoR::ProceduralObject, deletePoint), asCALL_THISCALL);
ROR_ASSERT(result >= 0);
116 result = engine->RegisterObjectMethod(
"ProceduralObjectClass",
"ProceduralPointClassPtr @getPoint(int pos)", asMETHOD(
RoR::ProceduralObject, getPoint), asCALL_THISCALL);
ROR_ASSERT(result >= 0);
117 result = engine->RegisterObjectMethod(
"ProceduralObjectClass",
"int getNumPoints()", asMETHOD(
RoR::ProceduralObject, getNumPoints), asCALL_THISCALL);
ROR_ASSERT(result >= 0);
118 result = engine->RegisterObjectMethod(
"ProceduralObjectClass",
"ProceduralRoadClassPtr @getRoad()", asMETHOD(
ProceduralObject, getRoad), asCALL_THISCALL);
ROR_ASSERT(result >= 0);
119 result = engine->RegisterObjectMethod(
"ProceduralObjectClass",
"int get_smoothing_num_splits() property", asFUNCTIONPR([](
ProceduralObject*
self) {
return self->smoothing_num_splits; },(
ProceduralObject*),
int ), asCALL_CDECL_OBJFIRST);
ROR_ASSERT(result >= 0);
120 result = engine->RegisterObjectMethod(
"ProceduralObjectClass",
"void set_smoothing_num_splits(int) property", asFUNCTIONPR([](
ProceduralObject*
self,
int n) {
self->smoothing_num_splits = n; }, (
ProceduralObject*, int),
void), asCALL_CDECL_OBJFIRST);
ROR_ASSERT(result >= 0);
125 result = engine->RegisterObjectMethod(
"ProceduralManagerClass",
"void addObject(ProceduralObjectClassPtr@)", asMETHOD(
ProceduralManager, addObject), asCALL_THISCALL);
ROR_ASSERT(result>=0);
126 result = engine->RegisterObjectMethod(
"ProceduralManagerClass",
"void removeObject(ProceduralObjectClassPtr@)", asMETHOD(
ProceduralManager, removeObject), asCALL_THISCALL);
ROR_ASSERT(result >= 0);
127 result = engine->RegisterObjectMethod(
"ProceduralManagerClass",
"int getNumObjects()", asMETHOD(
RoR::ProceduralManager, getNumObjects), asCALL_THISCALL);
ROR_ASSERT(result >= 0);
128 result = engine->RegisterObjectMethod(
"ProceduralManagerClass",
"ProceduralObjectClassPtr @getObject(int pos)", asMETHOD(
ProceduralManager, getObject), asCALL_THISCALL);
ROR_ASSERT(result >= 0);