From 4a09cb215848b24273430106333ce323dfed0333 Mon Sep 17 00:00:00 2001 From: Ricardo Antunes Date: Mon, 23 Sep 2024 20:03:52 +0200 Subject: [PATCH] docs(engine): pass main args to Cubos in all samples --- engine/samples/assets/bridge/main.cpp | 4 ++-- engine/samples/assets/json/main.cpp | 4 ++-- engine/samples/assets/saving/main.cpp | 4 ++-- engine/samples/collisions/main.cpp | 4 ++-- engine/samples/events/main.cpp | 4 ++-- engine/samples/games/cubosurfers/main.cpp | 4 ++-- engine/samples/hello-cubos/main.cpp | 4 ++-- engine/samples/imgui/main.cpp | 4 ++-- engine/samples/input/main.cpp | 4 ++-- engine/samples/render/main/main.cpp | 4 ++-- engine/samples/render/shadows/main.cpp | 4 ++-- 11 files changed, 22 insertions(+), 22 deletions(-) diff --git a/engine/samples/assets/bridge/main.cpp b/engine/samples/assets/bridge/main.cpp index 406899bff1..1b80fc6ab7 100644 --- a/engine/samples/assets/bridge/main.cpp +++ b/engine/samples/assets/bridge/main.cpp @@ -48,9 +48,9 @@ class TextBridge : public FileBridge }; /// [TextBridge::saveToFile] -int main() +int main(int argc, char** argv) { - auto cubos = Cubos(); + auto cubos = Cubos(argc, argv); cubos.plugin(settingsPlugin); cubos.plugin(assetsPlugin); diff --git a/engine/samples/assets/json/main.cpp b/engine/samples/assets/json/main.cpp index 1081bdea74..74c155496d 100644 --- a/engine/samples/assets/json/main.cpp +++ b/engine/samples/assets/json/main.cpp @@ -33,9 +33,9 @@ CUBOS_REFLECT_IMPL(Strings) } /// [Asset type] -int main() +int main(int argc, char** argv) { - Cubos cubos{}; + Cubos cubos{argc, argv}; cubos.plugin(settingsPlugin); cubos.plugin(assetsPlugin); diff --git a/engine/samples/assets/saving/main.cpp b/engine/samples/assets/saving/main.cpp index 5d50617c8d..38eb727fc6 100644 --- a/engine/samples/assets/saving/main.cpp +++ b/engine/samples/assets/saving/main.cpp @@ -29,9 +29,9 @@ CUBOS_REFLECT_IMPL(IntegerAsset) } /// [Asset type] -int main() +int main(int argc, char** argv) { - Cubos cubos{}; + Cubos cubos{argc, argv}; cubos.plugin(settingsPlugin); cubos.plugin(assetsPlugin); diff --git a/engine/samples/collisions/main.cpp b/engine/samples/collisions/main.cpp index b9d2c8696b..2c19ddfc10 100644 --- a/engine/samples/collisions/main.cpp +++ b/engine/samples/collisions/main.cpp @@ -67,9 +67,9 @@ struct State glm::vec3 bRotationAxis; }; -int main() +int main(int argc, char** argv) { - auto cubos = Cubos(); + auto cubos = Cubos(argc, argv); cubos.plugin(settingsPlugin); cubos.plugin(windowPlugin); diff --git a/engine/samples/events/main.cpp b/engine/samples/events/main.cpp index 768c18dde4..0dea29e5c2 100644 --- a/engine/samples/events/main.cpp +++ b/engine/samples/events/main.cpp @@ -31,9 +31,9 @@ struct State int step; }; -int main() +int main(int argc, char** argv) { - cubos::engine::Cubos cubos; + cubos::engine::Cubos cubos(argc, argv); cubos.resource(State{.step = 0}); /// [Adding event] diff --git a/engine/samples/games/cubosurfers/main.cpp b/engine/samples/games/cubosurfers/main.cpp index 1e3ba1caf1..4086c70c1e 100644 --- a/engine/samples/games/cubosurfers/main.cpp +++ b/engine/samples/games/cubosurfers/main.cpp @@ -18,9 +18,9 @@ static const Asset SceneAsset = AnyAsset("ee5bb451-05b7-430f-a641-a746f70 static const Asset PaletteAsset = AnyAsset("101da567-3d23-46ae-a391-c10ec00e8718"); static const Asset InputBindingsAsset = AnyAsset("b20900a4-20ee-4caa-8830-14585050bead"); -int main() +int main(int argc, char** argv) { - Cubos cubos{}; + Cubos cubos{argc, argv}; cubos.plugin(defaultsPlugin); cubos.plugin(spawnerPlugin); diff --git a/engine/samples/hello-cubos/main.cpp b/engine/samples/hello-cubos/main.cpp index ea2b5b01a6..0ebd747dbe 100644 --- a/engine/samples/hello-cubos/main.cpp +++ b/engine/samples/hello-cubos/main.cpp @@ -45,9 +45,9 @@ CUBOS_DEFINE_TAG(cubos::engine::helloTag); CUBOS_DEFINE_TAG(cubos::engine::worldTag); /// [Engine] -int main() +int main(int argc, char** argv) { - Cubos cubos{}; + Cubos cubos{argc, argv}; /// [Engine] /// [Hello Cubos] diff --git a/engine/samples/imgui/main.cpp b/engine/samples/imgui/main.cpp index 4656070b18..f09eebe14d 100644 --- a/engine/samples/imgui/main.cpp +++ b/engine/samples/imgui/main.cpp @@ -85,9 +85,9 @@ CUBOS_REFLECT_IMPL(DummyResource) } /// [Creating a dummy resource] -int main() +int main(int argc, char** argv) { - Cubos cubos{}; + Cubos cubos{argc, argv}; /// [Adding the plugin] cubos.plugin(settingsPlugin); diff --git a/engine/samples/input/main.cpp b/engine/samples/input/main.cpp index bbaabbba0c..e236b01f72 100644 --- a/engine/samples/input/main.cpp +++ b/engine/samples/input/main.cpp @@ -189,9 +189,9 @@ static void showcaseMouseButtons(const Input& input, bool& explained) } /// [Showcase Mouse Buttons] -int main() +int main(int argc, char** argv) { - auto cubos = Cubos(); + auto cubos = Cubos(argc, argv); /// [Adding the plugin] cubos.plugin(settingsPlugin); diff --git a/engine/samples/render/main/main.cpp b/engine/samples/render/main/main.cpp index 079e311046..45599d7e75 100644 --- a/engine/samples/render/main/main.cpp +++ b/engine/samples/render/main/main.cpp @@ -15,9 +15,9 @@ using namespace cubos::engine; static const Asset SceneAsset = AnyAsset("05db7643-a8b8-49cd-8c16-0992136cfacf"); static const Asset PaletteAsset = AnyAsset("1aa5e234-28cb-4386-99b4-39386b0fc215"); -int main() +int main(int argc, char** argv) { - Cubos cubos{}; + Cubos cubos{argc, argv}; /// [Adding the plugins] cubos.plugin(settingsPlugin); diff --git a/engine/samples/render/shadows/main.cpp b/engine/samples/render/shadows/main.cpp index eb78f3986a..21448e4768 100644 --- a/engine/samples/render/shadows/main.cpp +++ b/engine/samples/render/shadows/main.cpp @@ -28,9 +28,9 @@ CUBOS_REFLECT_IMPL(Spin) return cubos::core::ecs::TypeBuilder("Spin").build(); } -int main() +int main(int argc, char** argv) { - Cubos cubos{}; + Cubos cubos{argc, argv}; cubos.component();