diff --git a/WickedEngine/wiApplication_BindLua.cpp b/WickedEngine/wiApplication_BindLua.cpp index 00197b765..7faa90eed 100644 --- a/WickedEngine/wiApplication_BindLua.cpp +++ b/WickedEngine/wiApplication_BindLua.cpp @@ -4,6 +4,7 @@ #include "wiRenderPath2D_BindLua.h" #include "wiLoadingScreen_BindLua.h" #include "wiProfiler.h" +#include "wiPlatform.h" namespace wi::lua { @@ -26,6 +27,7 @@ namespace wi::lua lunamethod(Application_BindLua, SetVRAMUsageDisplay), lunamethod(Application_BindLua, GetCanvas), lunamethod(Application_BindLua, SetCanvas), + lunamethod(Application_BindLua, Exit), { NULL, NULL } }; Luna::PropertyType Application_BindLua::properties[] = { @@ -382,6 +384,12 @@ namespace wi::lua return 1; } + int Application_BindLua::Exit(lua_State* L) + { + wi::platform::Exit(); + return 0; + } + int SetProfilerEnabled(lua_State* L) { diff --git a/WickedEngine/wiApplication_BindLua.h b/WickedEngine/wiApplication_BindLua.h index c2b9a6cc0..03af22c97 100644 --- a/WickedEngine/wiApplication_BindLua.h +++ b/WickedEngine/wiApplication_BindLua.h @@ -59,6 +59,8 @@ namespace wi::lua int GetCanvas(lua_State* L); int SetCanvas(lua_State* L); + int Exit(lua_State* L); + static void Bind(); }; diff --git a/WickedEngine/wiScene_BindLua.cpp b/WickedEngine/wiScene_BindLua.cpp index 1f96efc09..e7e2a2ad9 100644 --- a/WickedEngine/wiScene_BindLua.cpp +++ b/WickedEngine/wiScene_BindLua.cpp @@ -522,6 +522,7 @@ Luna::FunctionType Scene_BindLua::methods[] = { lunamethod(Scene_BindLua, Component_CreateName), lunamethod(Scene_BindLua, Component_CreateLayer), lunamethod(Scene_BindLua, Component_CreateTransform), + lunamethod(Scene_BindLua, Component_CreateCamera), lunamethod(Scene_BindLua, Component_CreateEmitter), lunamethod(Scene_BindLua, Component_CreateHairParticleSystem), lunamethod(Scene_BindLua, Component_CreateLight), @@ -947,6 +948,23 @@ int Scene_BindLua::Component_CreateTransform(lua_State* L) } return 0; } +int Scene_BindLua::Component_CreateCamera(lua_State* L) +{ + int argc = wi::lua::SGetArgCount(L); + if (argc > 0) + { + Entity entity = (Entity)wi::lua::SGetLongLong(L, 1); + + CameraComponent& component = scene->cameras.Create(entity); + Luna::push(L, &component); + return 1; + } + else + { + wi::lua::SError(L, "Scene::Component_CreateCamera(Entity entity) not enough arguments!"); + } + return 0; +} int Scene_BindLua::Component_CreateLight(lua_State* L) { int argc = wi::lua::SGetArgCount(L); diff --git a/WickedEngine/wiScene_BindLua.h b/WickedEngine/wiScene_BindLua.h index 7bf20248a..46dd52b65 100644 --- a/WickedEngine/wiScene_BindLua.h +++ b/WickedEngine/wiScene_BindLua.h @@ -48,6 +48,7 @@ namespace wi::lua::scene int Component_CreateName(lua_State* L); int Component_CreateLayer(lua_State* L); int Component_CreateTransform(lua_State* L); + int Component_CreateCamera(lua_State* L); int Component_CreateEmitter(lua_State* L); int Component_CreateHairParticleSystem(lua_State* L); int Component_CreateLight(lua_State* L); diff --git a/WickedEngine/wiVersion.cpp b/WickedEngine/wiVersion.cpp index e07fe771c..179617795 100644 --- a/WickedEngine/wiVersion.cpp +++ b/WickedEngine/wiVersion.cpp @@ -9,7 +9,7 @@ namespace wi::version // minor features, major updates, breaking compatibility changes const int minor = 71; // minor bug fixes, alterations, refactors, updates - const int revision = 388; + const int revision = 389; const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision); @@ -50,7 +50,7 @@ All contributors: https://github.com/turanszkij/WickedEngine/graphs/contributors Patreon supporters --------------------------- -Nemerle, James Webb, Quifeng Jin, TheGameCreators, Joseph Goldin, Yuri, Sergey K, Yukawa Kanta, Dragon Josh, John, LurkingNinja, Bernardo Del Castillo, Invictus, Scott Hunt, Yazan Altaki, Tuan NV, Robert MacGregor, cybernescence, Alexander Dahlin, blueapples, Delhills, NI NI, Sherief, ktopoet, Justin Macklin, Cédric Fabre, TogetherTeam, Bartosz Boczula, Arne Koenig, Ivan Trajchev, nathants, Fahd Ahmed, Gabriel Jadderson, SAS_Controller, Dominik Madarász, Segfault, Mike amanfo, Dennis Brakhane, rookie, Peter Moore, therealjtgill, Nicolas Embleton, Desuuc, radino1977, Anthony Curtis, manni heck, Matthias Hölzl, Phyffer, Lucas Pinheiro, Tapkaara, gpman, Anthony Python, Gnowos, Klaus, slaughternaut, Paul Brain, Connor Greaves, Alexandr, Lee Bamber, MCAlarm MC2, Titoutan, Willow, Aldo, lokimx, K. Osterman, Nomad, ykl, Alex Krokos +Nemerle, James Webb, Quifeng Jin, TheGameCreators, Joseph Goldin, Yuri, Sergey K, Yukawa Kanta, Dragon Josh, John, LurkingNinja, Bernardo Del Castillo, Invictus, Scott Hunt, Yazan Altaki, Tuan NV, Robert MacGregor, cybernescence, Alexander Dahlin, blueapples, Delhills, NI NI, Sherief, ktopoet, Justin Macklin, Cédric Fabre, TogetherTeam, Bartosz Boczula, Arne Koenig, Ivan Trajchev, nathants, Fahd Ahmed, Gabriel Jadderson, SAS_Controller, Dominik Madarász, Segfault, Mike amanfo, Dennis Brakhane, rookie, Peter Moore, therealjtgill, Nicolas Embleton, Desuuc, radino1977, Anthony Curtis, manni heck, Matthias Hölzl, Phyffer, Lucas Pinheiro, Tapkaara, gpman, Anthony Python, Gnowos, Klaus, slaughternaut, Paul Brain, Connor Greaves, Alexandr, Lee Bamber, MCAlarm MC2, Titoutan, Willow, Aldo, lokimx, K. Osterman, Nomad, ykl, Alex Krokos, Timmy )"; return credits;