From 458c3c30a0338bcb3cbc43f515fe667d8f75d487 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Wed, 12 Mar 2025 20:33:40 +0100 Subject: [PATCH] Add a few more log messages --- CMakeLists.txt | 1 + src/PlayerAttributes.cpp | 4 +++- src/TileGenerator.cpp | 8 ++++++-- src/mapper.cpp | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d5f860..2dde4a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,6 +64,7 @@ if(zlib-ng_FOUND) set(USE_ZLIB_NG TRUE) message(STATUS "Found zlib-ng, using it instead of zlib.") else() + message(STATUS "zlib-ng not found, falling back to zlib.") find_package(ZLIB REQUIRED) set(USE_ZLIB_NG FALSE) endif() diff --git a/src/PlayerAttributes.cpp b/src/PlayerAttributes.cpp index fad9781..654e49c 100644 --- a/src/PlayerAttributes.cpp +++ b/src/PlayerAttributes.cpp @@ -136,13 +136,15 @@ PlayerAttributes::PlayerAttributes(const std::string &worldDir) std::string backend = read_setting_default("player_backend", ifs, "files"); ifs.close(); - verbosestream << "Player backend is " << backend << std::endl; + verbosestream << "Player backend: " << backend << std::endl; if (backend == "files") FilesReader(worldDir + "players").read(m_players); else if (backend == "sqlite3") SQLiteReader(worldDir + "players.sqlite").read(m_players); else throw std::runtime_error(std::string("Unknown player backend: ") + backend); + + verbosestream << "Loaded " << m_players.size() << " players" << std::endl; } PlayerAttributes::Players::const_iterator PlayerAttributes::begin() const diff --git a/src/TileGenerator.cpp b/src/TileGenerator.cpp index 3af9b63..9f80013 100644 --- a/src/TileGenerator.cpp +++ b/src/TileGenerator.cpp @@ -258,6 +258,7 @@ void TileGenerator::parseColorsFile(const std::string &fileName) std::ifstream in(fileName); if (!in.good()) throw std::runtime_error("Specified colors file could not be found"); + verbosestream << "Parsing colors.txt: " << fileName << std::endl; parseColorsStream(in); } @@ -527,8 +528,11 @@ void TileGenerator::createImage() image_height += (m_scales & SCALE_BOTTOM) ? scale_d : 0; if(image_width > 4096 || image_height > 4096) { - errorstream << "Warning: The width or height of the image to be created exceeds 4096 pixels!" - << " (Dimensions: " << image_width << "x" << image_height << ")" + errorstream << "Warning: The side length of the image to be created exceeds 4096 pixels!" + << " (dimensions: " << image_width << "x" << image_height << ")" + << std::endl; + } else { + verbosestream << "Creating image with size " << image_width << "x" << image_height << std::endl; } m_image = new Image(image_width, image_height); diff --git a/src/mapper.cpp b/src/mapper.cpp index 877254a..b3116a9 100644 --- a/src/mapper.cpp +++ b/src/mapper.cpp @@ -91,7 +91,7 @@ static std::string search_colors(const std::string &worldpath) return SHAREDIR "/colors.txt"; errorstream << "Warning: Falling back to using colors.txt from current directory." << std::endl; - return "colors.txt"; + return "./colors.txt"; } int main(int argc, char *argv[])