]> git.localhorst.tv Git - blank.git/blobdiff - src/app/Runtime.cpp
move RandomWalk into new "ai" module
[blank.git] / src / app / Runtime.cpp
index 8ddab262e483e34b5f24f01fab08d13b5f9702dd..6a4c783ef50222b0664fe61489e3b7443674ff70 100644 (file)
@@ -1,5 +1,7 @@
 #include "Runtime.hpp"
 
+#include "init.hpp"
+
 #include <cctype>
 #include <cstdlib>
 #include <iostream>
@@ -49,6 +51,8 @@ void Runtime::ReadArgs(int argc, const char *const *argv) {
                                                config.interface.mouse_disabled = true;
                                        } else if (strcmp(arg + 2, "no-hud") == 0) {
                                                config.interface.visual_disabled = true;
+                                       } else if (strcmp(arg + 2, "no-audio") == 0) {
+                                               config.interface.audio_disabled = true;
                                        } else {
                                                cerr << "unknown option " << arg << endl;
                                                error = true;
@@ -109,9 +113,6 @@ void Runtime::ReadArgs(int argc, const char *const *argv) {
                                        }
                                }
                        }
-               } else if (isdigit(arg[0])) {
-                       // positional number interpreted as -n
-                       n = strtoul(arg, nullptr, 10);
                } else {
                        cerr << "unable to interpret argument "
                                << i << " (" << arg << ")" << endl;
@@ -142,7 +143,8 @@ int Runtime::Execute() {
                return 1;
        }
 
-       Application app(config);
+       Init init(config.doublebuf, config.multisampling);
+       Application app(init.window, config);
        switch (mode) {
                default:
                case NORMAL: