X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2FRuntime.hpp;h=2d169d0149abbcddf69ee8321f121484f783b7f5;hb=b066e776622f96e906600a0c4a08de392bd03676;hp=ee0b4a023737ef1f4d6fea40d7723ab621e10667;hpb=6f94235a5b7c140852703e60c8a74760b8b61d99;p=blank.git diff --git a/src/app/Runtime.hpp b/src/app/Runtime.hpp index ee0b4a0..2d169d0 100644 --- a/src/app/Runtime.hpp +++ b/src/app/Runtime.hpp @@ -1,13 +1,21 @@ #ifndef BLANK_RUNTIME_HPP_ #define BLANK_RUNTIME_HPP_ -#include "Application.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 { @@ -25,18 +33,39 @@ public: ERROR, }; + enum Target { + STANDALONE, + SERVER, + CLIENT, + }; + + struct Config { + blank::Config game = blank::Config(); + HeadlessEnvironment::Config env = HeadlessEnvironment::Config(); + Generator::Config gen = Generator::Config(); + World::Config world = World::Config(); + }; + Runtime() noexcept; void ReadArgs(int argc, const char *const *argv); 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; - Application::Config config; + Config config; };