diff --git a/src/chat.cpp b/src/chat.cpp index ec84d125f..d9e2716a3 100644 --- a/src/chat.cpp +++ b/src/chat.cpp @@ -25,6 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "config.h" #include "debug.h" +#include "settings.h" #include "util/strfnd.h" #include "util/string.h" #include "util/numeric.h" diff --git a/src/chat.h b/src/chat.h index 444d3bede..adba2b62e 100644 --- a/src/chat.h +++ b/src/chat.h @@ -19,6 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #pragma once +#include #include #include #include @@ -26,7 +27,6 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "irrlichttypes.h" #include "util/enriched_string.h" -#include "settings.h" // Chat console related classes diff --git a/src/client/camera.cpp b/src/client/camera.cpp index 615d30c87..a37245f9a 100644 --- a/src/client/camera.cpp +++ b/src/client/camera.cpp @@ -38,6 +38,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "script/scripting_client.h" #include "gettext.h" #include +#include #include #define CAMERA_OFFSET_STEP 200 diff --git a/src/client/fontengine.cpp b/src/client/fontengine.cpp index 2d00f3cf4..e3f38be62 100644 --- a/src/client/fontengine.cpp +++ b/src/client/fontengine.cpp @@ -24,8 +24,11 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "porting.h" #include "filesys.h" #include "gettext.h" +#include "settings.h" #include "irrlicht_changes/CGUITTFont.h" #include "util/numeric.h" // rangelim +#include +#include /** reference to access font engine, has to be initialized by main */ FontEngine *g_fontengine = nullptr; diff --git a/src/client/fontengine.h b/src/client/fontengine.h index 78608e517..aa8ab7e36 100644 --- a/src/client/fontengine.h +++ b/src/client/fontengine.h @@ -22,12 +22,16 @@ with this program; if not, write to the Free Software Foundation, Inc., #include #include "util/basic_macros.h" #include "irrlichttypes.h" -#include -#include -#include -#include "settings.h" +#include "irrString.h" // utf8_to_wide #include "threading/mutex_auto_lock.h" +namespace irr { + namespace gui { + class IGUIEnvironment; + class IGUIFont; + } +} + #define FONT_SIZE_UNSPECIFIED 0xFFFFFFFF enum FontMode : u8 { diff --git a/src/client/imagesource.cpp b/src/client/imagesource.cpp index 195d57a41..1b9131797 100644 --- a/src/client/imagesource.cpp +++ b/src/client/imagesource.cpp @@ -20,15 +20,15 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "imagesource.h" #include -#include "settings.h" -#include "mesh.h" -#include "util/strfnd.h" -#include "renderingengine.h" -#include "util/base64.h" -#include "irrlicht_changes/printing.h" #include "imagefilters.h" +#include "mesh.h" +#include "renderingengine.h" +#include "settings.h" #include "texturepaths.h" +#include "irrlicht_changes/printing.h" +#include "util/base64.h" #include "util/numeric.h" +#include "util/strfnd.h" //////////////////////////////// @@ -1832,6 +1832,12 @@ bool ImageSource::generateImagePart(std::string_view part_of_name, #undef CHECK_DIM +ImageSource::ImageSource() : + m_setting_mipmap{g_settings->getBool("mip_map")}, + m_setting_trilinear_filter{g_settings->getBool("trilinear_filter")}, + m_setting_bilinear_filter{g_settings->getBool("bilinear_filter")}, + m_setting_anisotropic_filter{g_settings->getBool("anisotropic_filter")} +{} video::IImage* ImageSource::generateImage(std::string_view name, std::set &source_image_names) diff --git a/src/client/imagesource.h b/src/client/imagesource.h index f3a30617a..488ef1e2d 100644 --- a/src/client/imagesource.h +++ b/src/client/imagesource.h @@ -20,8 +20,11 @@ with this program; if not, write to the Free Software Foundation, Inc., #pragma once #include +#include +#include #include -#include "settings.h" + +using namespace irr; // This file is only used for internal generation of images. // Use texturesource.h to handle textures. @@ -45,6 +48,8 @@ private: // Generates images using texture modifiers, and caches source images. struct ImageSource { + ImageSource(); + /*! Generates an image from a full string like * "stone.png^mineral_coal.png^[crack:1:0". * The returned Image should be dropped. @@ -58,13 +63,6 @@ struct ImageSource { // TODO should probably be moved elsewhere static video::SColor getImageAverageColor(const video::IImage &image); - ImageSource() : - m_setting_mipmap{g_settings->getBool("mip_map")}, - m_setting_trilinear_filter{g_settings->getBool("trilinear_filter")}, - m_setting_bilinear_filter{g_settings->getBool("bilinear_filter")}, - m_setting_anisotropic_filter{g_settings->getBool("anisotropic_filter")} - {}; - private: // Generate image based on a string like "stone.png" or "[crack:1:0". diff --git a/src/client/localplayer.h b/src/client/localplayer.h index 275f556e4..05fcb2cbb 100644 --- a/src/client/localplayer.h +++ b/src/client/localplayer.h @@ -22,7 +22,6 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "player.h" #include "environment.h" #include "constants.h" -#include "settings.h" #include "lighting.h" #include diff --git a/src/client/texturesource.cpp b/src/client/texturesource.cpp index f18fa6cbf..7f2701c78 100644 --- a/src/client/texturesource.cpp +++ b/src/client/texturesource.cpp @@ -20,12 +20,13 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "texturesource.h" #include -#include "util/thread.h" -#include "imagefilters.h" #include "guiscalingfilter.h" -#include "renderingengine.h" -#include "texturepaths.h" +#include "imagefilters.h" #include "imagesource.h" +#include "renderingengine.h" +#include "settings.h" +#include "texturepaths.h" +#include "util/thread.h" // Stores internal information about a texture.