X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2FRuntime.hpp;h=36808a0e2a0e385cbcc9b2bd013e4310abdba1ef;hb=38a4cffc0b6aa58e49d24c06aad7bee14cb6515d;hp=036b8dbfc635ef9078454036113626b2b79266b0;hpb=afd253b2dd10fdf2d4655d3d4a5766e6aa8c1a2c;p=blank.git diff --git a/src/app/Runtime.hpp b/src/app/Runtime.hpp index 036b8db..36808a0 100644 --- a/src/app/Runtime.hpp +++ b/src/app/Runtime.hpp @@ -1,14 +1,21 @@ #ifndef BLANK_RUNTIME_HPP_ #define BLANK_RUNTIME_HPP_ +#include "Environment.hpp" +#include "../client/Client.hpp" +#include "../server/Server.hpp" #include "../ui/Interface.hpp" +#include "../world/Generator.hpp" #include "../world/World.hpp" #include +#include namespace blank { +class HeadlessApplication; + /// Parse and interpret arguemnts, then set up the environment and execute. class Runtime { @@ -26,12 +33,22 @@ public: ERROR, }; + enum Target { + STANDALONE, + SERVER, + CLIENT, + }; + struct Config { bool vsync = true; bool doublebuf = true; int multisampling = 1; + client::Client::Config client = client::Client::Config(); + Generator::Config gen = Generator::Config(); + HeadlessEnvironment::Config env = HeadlessEnvironment::Config(); Interface::Config interface = Interface::Config(); + server::Server::Config server = server::Server::Config(); World::Config world = World::Config(); }; @@ -41,9 +58,17 @@ public: int Execute(); +private: + void RunStandalone(); + void RunServer(); + void RunClient(); + + void Run(HeadlessApplication &); + private: const char *name; Mode mode; + Target target; std::size_t n; std::size_t t; Config config;