Separated out from #2930 to make things more manageable.
These changes do not involve the refcounting redesign, so there is small chance for bugs. I tested races and vehicle removal, everything works.
New script features:
imgui: enum ImGuiWindowFlags; ImGui::SliderInt(); class ImDrawList; ImGui::PushStyleColor(); ImGui::PlotLines()
game object funcs: getMouseScreenPosition(), getMouseTerrainPosition(), getScreenPosFromWorldPos(), getDisplaySize()
Documentation of GameScriptClass organized into groups.
New game features:
loadscript <filename> console command.
Script Monitor UI in Console window.
Developers only: Tidy-up of AngelScript bindings:
I moved all AngelScript-registration code to a single location, a new directory 'scripting/bindings/'. Previously, those registrations were all over the place (some in ScriptEngine.cpp, some in LocalStorage.cpp, most in FoobarAngelscript.cpp files). I placed all in dedicated 'FoobarAngelscript.cpp' files. It will make future bindings better organized.
Code changes:
scripting/bindings/ConsoleAngelscript.cpp - new file, extracted from ScriptEngine.cpp
scripting/bindings/GameScriptAngelscript.cpp - new file, extracted from ScriptEngine.cpp
scripting/bindings/ActorAngelscript.cpp - new file, extracted from ScriptEngine.cpp
scripting/bindings/InputEngineAngelscript.cpp - new file, extracted from ScriptEngine.cpp
scripting/bindings/ScriptEventsAngelscript.cpp - new file, extracted from ScriptEngine.cpp
scripting/bindings/VehicleAiAngelscript.cpp - new file, extracted from ScriptEngine.cpp
scripting/bindings/LocalStorageAngelscript.cpp - new file, extracted from LocalStorage.cpp
scripting/bindings/ImGuiAngelscript.cpp - existing file, just moved as-is.
scripting/bindings/OgreAngelscript.cpp - existing file, just moved as-is.
scripting/bindings/InputEngineAngelscript.cpp - existing file, just moved as-is.
Separated out from #2930 to make things more manageable. These changes do not involve the refcounting redesign, so there is small chance for bugs. I tested races and vehicle removal, everything works.
New script features:
enum ImGuiWindowFlags; ImGui::SliderInt(); class ImDrawList; ImGui::PushStyleColor(); ImGui::PlotLines()
game
object funcs:getMouseScreenPosition(), getMouseTerrainPosition(), getScreenPosFromWorldPos(), getDisplaySize()
GameScriptClass
organized into groups.New game features:
loadscript <filename>
console command.Developers only: Tidy-up of AngelScript bindings:
I moved all AngelScript-registration code to a single location, a new directory 'scripting/bindings/'. Previously, those registrations were all over the place (some in ScriptEngine.cpp, some in LocalStorage.cpp, most in FoobarAngelscript.cpp files). I placed all in dedicated 'FoobarAngelscript.cpp' files. It will make future bindings better organized.
Code changes: