X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2FRuntime.hpp;h=ac508b90677bf8fbe5d19e44c7111bc2c55456a5;hb=34a7fafb4c2d4ed95eb990eda5c02d5c79d3411b;hp=2fdf2e5b0ba2880db1af94f2da8d9560d9db52c8;hpb=b7d09e1e35ef90282c97509e0020b20db3c7ea9f;p=blank.git diff --git a/src/app/Runtime.hpp b/src/app/Runtime.hpp index 2fdf2e5..ac508b9 100644 --- a/src/app/Runtime.hpp +++ b/src/app/Runtime.hpp @@ -1,24 +1,44 @@ #ifndef BLANK_RUNTIME_HPP_ #define BLANK_RUNTIME_HPP_ -#include "Application.hpp" +#include "../ui/Interface.hpp" +#include "../world/World.hpp" #include +#include namespace blank { +/// Parse and interpret arguemnts, then set up the environment and execute. class Runtime { public: enum Mode { + /// default behaviour: run until user quits, dynamic timesteps NORMAL, + /// quit after n frames FRAME_LIMIT, + /// quit after n milliseconds TIME_LIMIT, + /// quit after n frames, use fixed timestap FIXED_FRAME_LIMIT, + /// display error message and quit with failure ERROR, }; + struct Config { + bool vsync = true; + bool doublebuf = true; + int multisampling = 1; + + std::string asset_path; + std::string save_path; + + Interface::Config interface = Interface::Config(); + World::Config world = World::Config(); + }; + Runtime() noexcept; void ReadArgs(int argc, const char *const *argv); @@ -30,7 +50,7 @@ private: Mode mode; std::size_t n; std::size_t t; - Application::Config config; + Config config; };