I think so, I'll check. But I am fairly sure I just hacked a new interpreter from the old one.

I might have made some adjustments to allow me to use it with the new OgreBites trays. But, I'll check.
A good starting point.
I chose Angelscript because it's the by far easiest scripting library to bind.
This is my console script functions so far:
Code: Select all
asIScriptEngine* engine = AngelScriptInterpreter::getSingletonPtr()->getInterpreter();
engine->RegisterObjectType("TerrainTest", 0, asOBJ_REF | asOBJ_NOHANDLE);
engine->RegisterObjectMethod("TerrainTest", "void quit()", asMETHOD(TerrainTest, quit), asCALL_THISCALL);
engine->RegisterObjectMethod("TerrainTest", "void saveCampos()", asMETHOD(TerrainTest, saveCampos), asCALL_THISCALL);
engine->RegisterObjectMethod("TerrainTest", "void restoreCampos()", asMETHOD(TerrainTest, restoreCampos), asCALL_THISCALL);
engine->RegisterObjectMethod("TerrainTest", "void setCampos(float, float, float)", asMETHOD(TerrainTest, setCampos), asCALL_THISCALL);
engine->RegisterObjectMethod("TerrainTest", "void saveTerrain()", asMETHOD(TerrainTest, saveTerrain), asCALL_THISCALL);
// Register the singleton's address that the script will use to access it
engine->RegisterGlobalProperty("TerrainTest app", this);
Allows me to call 'app.quit()', 'app.saveTerrain()', etc. from the console.
That's pure Angelscript, no wrapper or anything.
Even I can figure out how to use it.
I plan to implement auto-complete, which is fairly simple to do using Angelscript. Just iterate the functions on the 'app' object.
(I think).
Also, I am very lazy, so I think I'll implement an auto-parenthesis function.
I find it awkward to have to write app.quit() when I can write app.quit instead.
Unless it's carrying parameters, of course.