Rigs of Rods 2026.01
Soft-body Physics Simulation
Loading...
Searching...
No Matches
TurbopropAngelscript.cpp
Go to the documentation of this file.
1#include "Application.h"
2#include "ScriptEngine.h"
3#include "TurboProp.h"
4#include "SimData.h"
5
6#include <angelscript.h>
7
8using namespace AngelScript;
9
10void RoR::RegisterTurbopropNative(asIScriptEngine* engine)
11{
12 int result = 0;
13
14 AeroEngine::RegisterRefCountingObject(engine, "TurbopropClass");
15 AeroEnginePtr::RegisterRefCountingObjectPtr(engine, "TurbopropClassPtr", "TurbopropClass");
16
17 // PLEASE maintain same order as in 'physics/air/Turboprop.h' and 'doc/angelscript/Script2Game/TurbopropClass.h'
18 result = engine->RegisterObjectMethod("TurbopropClass", "float getPropellerPitch()", asMETHOD(Turboprop, getPropellerPitch), asCALL_THISCALL); ROR_ASSERT(result >= 0);
19 result = engine->RegisterObjectMethod("TurbopropClass", "float getPropellerIndicatedTorque()", asMETHOD(Turboprop, getPropellerIndicatedTorque), asCALL_THISCALL); ROR_ASSERT(result >= 0);
20 result = engine->RegisterObjectMethod("TurbopropClass", "float getPropellerMaxTorque()", asMETHOD(Turboprop, getPropellerMaxTorque), asCALL_THISCALL); ROR_ASSERT(result >= 0);
21 result = engine->RegisterObjectMethod("TurbopropClass", "float getPropellerMaxPower()", asMETHOD(Turboprop, getMaxPower), asCALL_THISCALL); ROR_ASSERT(result >= 0);
22 result = engine->RegisterObjectMethod("TurbopropClass", "bool isPistonProp()", asMETHOD(Turboprop, isPistonProp), asCALL_THISCALL); ROR_ASSERT(result >= 0);
23}
Central state/object manager and communications hub.
#define ROR_ASSERT(_EXPR)
Definition Application.h:40
Core data structures for simulation; Everything affected by by either physics, network or user intera...
void RegisterTurbopropNative(AngelScript::asIScriptEngine *engine)