#include "irrlichttypes.h"
#include "irrlicht.h"
#include "irrlichttypes_extrabloated.h"
#include "chat_interface.h"
#include "debug.h"
#include "unittest/test.h"
#include "server.h"
#include "filesys.h"
#include "version.h"
#include "client/game.h"
#include "defaultsettings.h"
#include "gettext.h"
#include "log.h"
#include "util/quicktune.h"
#include "httpfetch.h"
#include "gameparams.h"
#include "database/database.h"
#include "config.h"
#include "player.h"
#include "porting.h"
#include "network/socket.h"
#include "gui/guiMainMenu.h"
#include "client/clientlauncher.h"
#include "gui/guiEngine.h"
#include "gui/mainmenumanager.h"
#include <lua.h>
Macros | |
#define | DEBUGFILE "debug.txt" |
#define | DEFAULT_SERVER_PORT 30000 |
Typedefs | |
typedef std::map< std::string, ValueSpec > | OptionList |
Functions | |
static bool | get_cmdline_opts (int argc, char *argv[], Settings *cmd_args) |
static void | set_allowed_options (OptionList *allowed_options) |
static void | print_help (const OptionList &allowed_options) |
static void | print_allowed_options (const OptionList &allowed_options) |
static void | print_version () |
static void | print_worldspecs (const std::vector< WorldSpec > &worldspecs, std::ostream &os, bool print_name=true, bool print_path=true) |
static void | print_modified_quicktune_values () |
static void | list_game_ids () |
static void | list_worlds (bool print_name, bool print_path) |
static bool | setup_log_params (const Settings &cmd_args) |
static bool | create_userdata_path () |
static bool | init_common (const Settings &cmd_args, int argc, char *argv[]) |
static void | startup_message () |
static bool | read_config_file (const Settings &cmd_args) |
static void | init_log_streams (const Settings &cmd_args) |
static bool | game_configure (GameParams *game_params, const Settings &cmd_args) |
static void | game_configure_port (GameParams *game_params, const Settings &cmd_args) |
static bool | game_configure_world (GameParams *game_params, const Settings &cmd_args) |
static bool | get_world_from_cmdline (GameParams *game_params, const Settings &cmd_args) |
static bool | get_world_from_config (GameParams *game_params, const Settings &cmd_args) |
static bool | auto_select_world (GameParams *game_params) |
static std::string | get_clean_world_path (const std::string &path) |
static bool | game_configure_subgame (GameParams *game_params, const Settings &cmd_args) |
static bool | get_game_from_cmdline (GameParams *game_params, const Settings &cmd_args) |
static bool | determine_subgame (GameParams *game_params) |
static bool | run_dedicated_server (const GameParams &game_params, const Settings &cmd_args) |
static bool | migrate_map_database (const GameParams &game_params, const Settings &cmd_args) |
int | main (int argc, char *argv[]) |
Variables | |
FileLogOutput | file_log_output |
static OptionList | allowed_options |
#define DEBUGFILE "debug.txt" |
#define DEFAULT_SERVER_PORT 30000 |
typedef std::map<std::string, ValueSpec> OptionList |
|
static |
References _, DIR_DELIM, dstream, getAvailableWorlds(), infostream, GameParams::is_dedicated_server, porting::path_user, print_worldspecs(), and GameParams::world_path.
Referenced by game_configure_world().
|
static |
References fs::CreateDir(), porting::path_user, and fs::PathExists().
Referenced by main().
|
static |
References errorstream, findSubgame(), findWorldSubgame(), g_settings, GameParams::game_spec, Settings::get(), getWorldExists(), getWorldGameId(), SubgameSpec::id, infostream, SubgameSpec::isValid(), warningstream, and GameParams::world_path.
Referenced by game_configure_subgame().
|
static |
References errorstream, game_configure_port(), game_configure_subgame(), and game_configure_world().
Referenced by main().
|
static |
References DEFAULT_SERVER_PORT, Settings::exists(), g_settings, Settings::getU16(), GameParams::is_dedicated_server, and GameParams::socket_port.
Referenced by game_configure().
|
static |
References determine_subgame(), and get_game_from_cmdline().
Referenced by game_configure().
|
static |
References auto_select_world(), get_world_from_cmdline(), and get_world_from_config().
Referenced by game_configure().
|
static |
Referenced by get_world_from_cmdline(), and get_world_from_config().
|
static |
References allowed_options, Settings::parseCommandLine(), and set_allowed_options().
Referenced by main().
|
static |
References _, dstream, errorstream, Settings::exists(), findSubgame(), GameParams::game_spec, Settings::get(), and SubgameSpec::isValid().
Referenced by game_configure_subgame().
|
static |
References _, dstream, Settings::exists(), Settings::get(), get_clean_world_path(), getAvailableWorlds(), print_worldspecs(), and GameParams::world_path.
Referenced by game_configure_world().
|
static |
References Settings::exists(), g_settings, Settings::get(), get_clean_world_path(), and GameParams::world_path.
Referenced by game_configure_world().
|
static |
References Settings::createLayer(), g_settings, Settings::get(), Settings::getS32(), httpfetch_init(), init_gettext(), init_log_streams(), mysrand(), porting::path_locale, read_config_file(), set_default_settings(), SL_GLOBAL, sockets_cleanup(), sockets_init(), and startup_message().
Referenced by main().
|
static |
References Logger::addOutputMaxLevel(), ARRLEN, DEBUGFILE, DIR_DELIM, Settings::exists(), file_log_output, g_logger, g_settings, Settings::get(), Settings::getU64(), LL_MAX, porting::path_user, Logger::removeOutput(), FileLogOutput::setFile(), Logger::stringToLevel(), and warningstream.
Referenced by init_common().
|
static |
References getAvailableGameIds().
Referenced by main().
|
static |
References _, getAvailableWorlds(), and print_worldspecs().
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
References Logger::addOutputMaxLevel(), allowed_options, porting::attachOrCreateConsole(), BEGIN_DEBUG_EXCEPTION_HANDLER, create_userdata_path(), debug_set_exception_handler(), END_DEBUG_EXCEPTION_HANDLER, errorstream, Settings::exists(), g_logger, g_settings, g_settings_path, game_configure(), Settings::get(), get_cmdline_opts(), Settings::getBool(), Settings::getFlag(), httpfetch_cleanup(), init_common(), porting::initAndroid(), porting::initializePaths(), porting::initializePathsAndroid(), GameParams::is_dedicated_server, list_game_ids(), list_worlds(), LL_ACTION, print_help(), print_modified_quicktune_values(), print_version(), Logger::registerThread(), ClientLauncher::run(), run_dedicated_server(), run_tests(), sanity_check, setup_log_params(), porting::signal_handler_init(), stderr_output, Settings::updateConfigFile(), and GameParams::world_path.
Referenced by android_main().
|
static |
References actionstream, ServerMap::createDatabase(), DIR_DELIM, errorstream, Settings::exists(), Settings::get(), MapDatabase::listAllLoadableBlocks(), MapDatabase::loadBlock(), PP, Settings::readConfigFile(), Settings::set(), porting::signal_handler_killstatus(), Settings::updateConfigFile(), and GameParams::world_path.
Referenced by run_dedicated_server().
|
static |
References _, allowed_options, padStringRight(), and VALUETYPE_FLAG.
Referenced by print_help().
|
static |
References _, allowed_options, and print_allowed_options().
Referenced by main().
|
static |
References dstream, getQuicktuneNames(), getQuicktuneValue(), QuicktuneValue::getString(), and QuicktuneValue::modified.
Referenced by main().
|
static |
References g_build_info, g_version_hash, porting::getPlatformName(), and PROJECT_NAME_C.
Referenced by main().
|
static |
Referenced by auto_select_world(), get_world_from_cmdline(), and list_worlds().
|
static |
References DIR_DELIM, errorstream, Settings::exists(), g_settings, g_settings_path, Settings::get(), porting::path_user, Settings::readConfigFile(), and sanity_check.
Referenced by init_common().
|
static |
References _, TerminalChatConsole::clearKillStatus(), dedicated_server_loop(), errorstream, Settings::exists(), g_settings, g_term_console, GameParams::game_spec, Settings::get(), Settings::getBool(), SubgameSpec::id, infostream, Address::isIPv6(), migrate_map_database(), ServerEnvironment::migrateAuthDatabase(), ServerEnvironment::migratePlayersDatabase(), PLAYERNAME_ALLOWED_CHARS, PLAYERNAME_ALLOWED_CHARS_USER_EXPL, Address::Resolve(), Address::serializeString(), Address::setAddress(), TerminalChatConsole::setup(), porting::signal_handler_killstatus(), GameParams::socket_port, Thread::start(), Thread::stop(), TerminalChatConsole::stopAndWaitforThread(), string_allowed(), verbosestream, Thread::wait(), BaseException::what(), and GameParams::world_path.
Referenced by main().
|
static |
References _, allowed_options, VALUETYPE_FLAG, and VALUETYPE_STRING.
Referenced by get_cmdline_opts().
|
static |
References _, Logger::addOutput(), Logger::addOutputMaxLevel(), Logger::color_mode, dout_con_ptr, dstream, errorstream, Settings::exists(), g_logger, Settings::get(), Settings::getFlag(), LL_ERROR, LL_INFO, LL_VERBOSE, LOG_COLOR_ALWAYS, LOG_COLOR_AUTO, LOG_COLOR_NEVER, Logger::removeOutput(), Logger::setTraceEnabled(), socket_enable_debug_output, stderr_output, and verbosestream.
Referenced by main().
|
static |
References _, g_build_info, infostream, PROJECT_NAME, and SER_FMT_VER_HIGHEST_READ.
Referenced by init_common().
|
static |
Referenced by get_cmdline_opts(), main(), Settings::parseCommandLine(), print_allowed_options(), print_help(), and set_allowed_options().
FileLogOutput file_log_output |
Referenced by init_log_streams().