Node definition manager refactor (#7016)
[oweals/minetest.git] / src / main.cpp
index 3099c978999a444cf0a5476250d90edecce040e2..8fce83dcbb52c54aa9f5e471d5d9d4bc825c0bd7 100644 (file)
@@ -18,7 +18,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 */
 
 #include "irrlicht.h" // createDevice
-#include "mainmenumanager.h"
 #include "irrlichttypes_extrabloated.h"
 #include "chat_interface.h"
 #include "debug.h"
@@ -26,16 +25,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "server.h"
 #include "filesys.h"
 #include "version.h"
-#include "guiMainMenu.h"
 #include "game.h"
 #include "defaultsettings.h"
 #include "gettext.h"
 #include "log.h"
 #include "quicktune.h"
 #include "httpfetch.h"
-#include "guiEngine.h"
 #include "gameparams.h"
-#include "database.h"
+#include "database/database.h"
 #include "config.h"
 #include "player.h"
 #include "porting.h"
@@ -44,11 +41,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
        #include "terminal_chat_console.h"
 #endif
 #ifndef SERVER
+#include "gui/guiMainMenu.h"
 #include "client/clientlauncher.h"
+#include "gui/guiEngine.h"
+#include "gui/mainmenumanager.h"
 #endif
 
 #ifdef HAVE_TOUCHSCREENGUI
-       #include "touchscreengui.h"
+       #include "gui/touchscreengui.h"
 #endif
 
 #if !defined(SERVER) && \
@@ -322,11 +322,11 @@ static void print_allowed_options(const OptionList &allowed_options)
 static void print_version()
 {
        std::cout << PROJECT_NAME_C " " << g_version_hash
-                 << " (" << porting::getPlatformName() << ")" << std::endl;
+               << " (" << porting::getPlatformName() << ")" << std::endl;
 #ifndef SERVER
-       std::cout << "Using Irrlicht " << IRRLICHT_SDK_VERSION << std::endl;
+       std::cout << "Using Irrlicht " IRRLICHT_SDK_VERSION << std::endl;
 #endif
-       std::cout << "Build info: " << g_build_info << std::endl;
+       std::cout << g_build_info << std::endl;
 }
 
 static void list_game_ids()
@@ -838,13 +838,13 @@ static bool run_dedicated_server(const GameParams &game_params, const Settings &
                try {
                        // Create server
                        Server server(game_params.world_path, game_params.game_spec,
-                                       false, bind_addr.isIPv6(), true, &iface);
+                                       false, bind_addr, true, &iface);
 
                        g_term_console.setup(&iface, &kill, admin_nick);
 
                        g_term_console.start();
 
-                       server.start(bind_addr);
+                       server.start();
                        // Run server
                        dedicated_server_loop(server, kill);
                } catch (const ModError &e) {
@@ -872,8 +872,8 @@ static bool run_dedicated_server(const GameParams &game_params, const Settings &
                try {
                        // Create server
                        Server server(game_params.world_path, game_params.game_spec, false,
-                               bind_addr.isIPv6(), true);
-                       server.start(bind_addr);
+                               bind_addr, true);
+                       server.start();
 
                        // Run server
                        bool &kill = *porting::signal_handler_killstatus();