diff --git a/.gitignore b/.gitignore index 5405a74e9..fe3686d57 100644 --- a/.gitignore +++ b/.gitignore @@ -121,8 +121,5 @@ compile_commands.json *.sln .vs/ -# Optional user provided library folder -lib/irrlichtmt - # Generated mod storage database client/mod_storage.sqlite diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..932b64bf3 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "lib/irrlichtmt"] + path = lib/irrlichtmt + url = git@brn.systems:BRNSystems/irrlicht.git diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index af821b5be..093d4a544 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -256,6 +256,10 @@ connected_glass (Connect glass) bool false # Disable for speed or for different looks. smooth_lighting (Smooth lighting) bool true +# Enable full brightness for great visibility in the dark +# Disable if you think this is cheating +full_brightness (Full brightness) bool false + # Enables tradeoffs that reduce CPU load or increase rendering performance # at the expense of minor visual glitches that do not impact game playability. performance_tradeoffs (Tradeoffs for performance) bool false diff --git a/cmake/Modules/GenerateVersion.cmake b/cmake/Modules/GenerateVersion.cmake index ad0e38263..c61a2ea09 100644 --- a/cmake/Modules/GenerateVersion.cmake +++ b/cmake/Modules/GenerateVersion.cmake @@ -7,12 +7,6 @@ if(DEVELOPMENT_BUILD) ERROR_QUIET) if(VERSION_GITHASH) set(VERSION_GITHASH "${VERSION_STRING}-${VERSION_GITHASH}") - execute_process(COMMAND git diff-index --quiet HEAD - WORKING_DIRECTORY "${GENERATE_VERSION_SOURCE_DIR}" - RESULT_VARIABLE IS_DIRTY) - if(IS_DIRTY) - set(VERSION_GITHASH "${VERSION_GITHASH}-dirty") - endif() message(STATUS "*** Detected Git version ${VERSION_GITHASH} ***") endif() endif() diff --git a/lib/irrlichtmt b/lib/irrlichtmt new file mode 160000 index 000000000..85081d6fe --- /dev/null +++ b/lib/irrlichtmt @@ -0,0 +1 @@ +Subproject commit 85081d6fe0c422cf47f74714ee25562715528aa2 diff --git a/minetest.conf.example b/minetest.conf.example index 72b3d2046..eec37b7ac 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -187,6 +187,11 @@ # type: bool # smooth_lighting = true +# Enable full brightness for great visibility in the dark +# Disable if you think this is cheating +# type: bool +full_brightness (Full brightness) bool false + # Enables tradeoffs that reduce CPU load or increase rendering performance # at the expense of minor visual glitches that do not impact game playability. # type: bool diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index bb1d8c78c..81e729629 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -198,6 +198,7 @@ void set_default_settings() settings->setDefault("leaves_style", "fancy"); settings->setDefault("connected_glass", "false"); settings->setDefault("smooth_lighting", "true"); + settings->setDefault("full_brightness", "false"); settings->setDefault("performance_tradeoffs", "false"); settings->setDefault("lighting_alpha", "0.0"); settings->setDefault("lighting_beta", "1.5"); diff --git a/src/light.cpp b/src/light.cpp index d5389b450..82da00876 100644 --- a/src/light.cpp +++ b/src/light.cpp @@ -35,6 +35,7 @@ struct LightingParams { float a, b, c; // Lighting curve polynomial coefficients float boost, center, sigma; // Lighting curve parametric boost float gamma; // Lighting curve gamma correction + bool full_brightness; //Full brightness }; static LightingParams params; @@ -42,6 +43,9 @@ static LightingParams params; float decode_light_f(float x) { + if (params.full_brightness){ + return 1.0f; + } if (x >= 1.0f) // x is often 1.0f return 1.0f; x = std::fmax(x, 0.0f); @@ -62,6 +66,8 @@ void set_light_table(float gamma) // Lighting curve bounding gradients const float alpha = rangelim(g_settings->getFloat("lighting_alpha"), 0.0f, 3.0f); const float beta = rangelim(g_settings->getFloat("lighting_beta"), 0.0f, 3.0f); + const bool full_brightness = g_settings->getBool("full_brightness"); + params.full_brightness = full_brightness; // Lighting curve polynomial coefficients params.a = alpha + beta - 2.0f; params.b = 3.0f - 2.0f * alpha - beta;