X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fmain.cpp;h=8fce83dcbb52c54aa9f5e471d5d9d4bc825c0bd7;hb=d6050bee5187d0d456e9d95406fc74ba163ea3aa;hp=303004f0c6baf7cd8cb330ca768fcc7c147452fa;hpb=c42753338924bb29c61081c9f269772f89bcd808;p=oweals%2Fminetest.git diff --git a/src/main.cpp b/src/main.cpp index 303004f0c..8fce83dcb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -18,8 +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" @@ -27,27 +25,30 @@ 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" +#include "network/socket.h" #if USE_CURSES #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) && \ @@ -150,9 +151,6 @@ int main(int argc, char *argv[]) return 1; } - // Initialize debug stacks - DSTACK(FUNCTION_NAME); - // Debug handler BEGIN_DEBUG_EXCEPTION_HANDLER @@ -324,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() @@ -352,8 +350,8 @@ static void print_worldspecs(const std::vector &worldspecs, std::string name = worldspec.name; std::string path = worldspec.path; if (name.find(' ') != std::string::npos) - name = std::string("'") + name + "'"; - path = std::string("'") + path + "'"; + name = std::string("'").append(name).append("'"); + path = std::string("'").append(path).append("'"); name = padStringRight(name, 14); os << " " << name << " " << path << std::endl; } @@ -778,8 +776,6 @@ static bool determine_subgame(GameParams *game_params) *****************************************************************************/ static bool run_dedicated_server(const GameParams &game_params, const Settings &cmd_args) { - DSTACK("Dedicated server branch"); - verbosestream << _("Using world path") << " [" << game_params.world_path << "]" << std::endl; verbosestream << _("Using gameid") << " [" @@ -842,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) { @@ -876,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();