diff --git a/src/common/database.cpp b/src/common/database.cpp index 5fb9f02934..9b125e6bdc 100644 --- a/src/common/database.cpp +++ b/src/common/database.cpp @@ -164,7 +164,7 @@ void YamlDatabase::parse( const ryml::Tree& tree ){ for( const ryml::NodeRef &node : bodyNode ){ count += this->parseBodyNode( node ); -#ifdef DEBUG +#ifdef DETAILED_LOADING_OUTPUT ShowStatus( "Loading [%" PRIdPTR "/%" PRIdPTR "] entries from '" CL_WHITE "%s" CL_RESET "'" CL_CLL "\r", ++childNodesProgressed, childNodesCount, fileName ); #endif } diff --git a/src/config/core.hpp b/src/config/core.hpp index 1dcede8298..06ee57436a 100644 --- a/src/config/core.hpp +++ b/src/config/core.hpp @@ -100,6 +100,14 @@ /// Uncomment for use with Nemo patch ExtendOldCashShopPreview //#define ENABLE_OLD_CASHSHOP_PREVIEW_PATCH +#if defined(_DEBUG) || defined(DEBUG) + #define DETAILED_LOADING_OUTPUT +#endif + +/// Uncomment to forcibly disable the detailed loading output. +/// This will noticeably decrease the boot time of the map server by not having to print so many status messages. +//#undef DETAILED_LOADING_OUTPUT + /** * No settings past this point **/ diff --git a/src/map/itemdb.cpp b/src/map/itemdb.cpp index 1c941b79d1..d42089d7bb 100644 --- a/src/map/itemdb.cpp +++ b/src/map/itemdb.cpp @@ -4168,7 +4168,7 @@ static int itemdb_read_sqldb(void) { // process rows one by one while( SQL_SUCCESS == Sql_NextRow(mmysql_handle) ) { -#ifdef DEBUG +#ifdef DETAILED_LOADING_OUTPUT ShowStatus( "Loading [%" PRIu64 "/%" PRIu64 "] entries in '" CL_WHITE "%s" CL_RESET "'" CL_CLL "\r", ++rows, total_rows, item_db_name[fi] ); #endif std::vector data = {}; diff --git a/src/map/map.cpp b/src/map/map.cpp index bc1c03e0c6..8e070c9b72 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -3786,7 +3786,7 @@ int map_readallmaps (void) struct map_data *mapdata = &map[i]; char map_cache_decode_buffer[MAX_MAP_SIZE]; -#ifdef DEBUG +#ifdef DETAILED_LOADING_OUTPUT // show progress ShowStatus("Loading maps [%i/%i]: %s" CL_CLL "\r", i, map_num, mapdata->name); #endif diff --git a/src/map/mob.cpp b/src/map/mob.cpp index 5c04ab38e5..86d14ed77a 100644 --- a/src/map/mob.cpp +++ b/src/map/mob.cpp @@ -5285,7 +5285,7 @@ static int mob_read_sqldb(void) // process rows one by one while( SQL_SUCCESS == Sql_NextRow(mmysql_handle) ) { -#ifdef DEBUG +#ifdef DETAILED_LOADING_OUTPUT ShowStatus("Loading [%" PRIu64 "/%" PRIu64 "] entries in '" CL_WHITE "%s" CL_RESET "'" CL_CLL "\r", ++rows, total_rows, mob_db_name[fi]); #endif std::vector data = {}; diff --git a/src/map/npc.cpp b/src/map/npc.cpp index fedeff5caa..07031a1a5e 100644 --- a/src/map/npc.cpp +++ b/src/map/npc.cpp @@ -3611,7 +3611,7 @@ void npc_delsrcfile(const char* name) void npc_loadsrcfiles() { ShowStatus("Loading NPCs...\n"); for (const auto& file : npc_src_files) { -#ifdef DEBUG +#ifdef DETAILED_LOADING_OUTPUT ShowStatus("Loading NPC file: %s" CL_CLL "\r", file.c_str()); #endif npc_parsesrcfile(file.c_str());