mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-30 16:05:42 +00:00
New advanced preference to use a local ToD color-shift
Because the memory cost is now acceptable (and only there when playing maps with big caves using special ToD)
This commit is contained in:
parent
9c4348ac51
commit
037b79e36b
@ -44,7 +44,7 @@ Version 1.9.0-svn:
|
|||||||
* Items & scenery: New anvil, and revised trash and lighthouse
|
* Items & scenery: New anvil, and revised trash and lighthouse
|
||||||
* Two new flag styles.
|
* Two new flag styles.
|
||||||
* Animate terrain in editor
|
* Animate terrain in editor
|
||||||
* Underground maps now use a ToD color-shift
|
* New advanced preference to use a local ToD color-shift
|
||||||
* Language and i18n:
|
* Language and i18n:
|
||||||
* Updated translations: British English, Catalan, Chinese (Simplified),
|
* Updated translations: British English, Catalan, Chinese (Simplified),
|
||||||
Chinese (Traditional), Czech, Dutch, Finnish, French, Galician, German,
|
Chinese (Traditional), Czech, Dutch, Finnish, French, Galician, German,
|
||||||
|
@ -42,6 +42,14 @@
|
|||||||
default=yes
|
default=yes
|
||||||
[/advanced_preference]
|
[/advanced_preference]
|
||||||
|
|
||||||
|
[advanced_preference]
|
||||||
|
field=local_tod_light
|
||||||
|
name=_"Local time of day light"
|
||||||
|
description=_"Local time of day light effect (use more memory)."
|
||||||
|
type=boolean
|
||||||
|
default=no
|
||||||
|
[/advanced_preference]
|
||||||
|
|
||||||
[advanced_preference]
|
[advanced_preference]
|
||||||
field=startup_effect
|
field=startup_effect
|
||||||
name=_"Show Titlescreen Animation"
|
name=_"Show Titlescreen Animation"
|
||||||
|
@ -64,7 +64,6 @@
|
|||||||
#temporary disable hex brightening
|
#temporary disable hex brightening
|
||||||
hex_brightening=1.0
|
hex_brightening=1.0
|
||||||
hex_semi_brightening=1.25
|
hex_semi_brightening=1.25
|
||||||
local_light=no
|
|
||||||
|
|
||||||
flag_rgb=flag_green
|
flag_rgb=flag_green
|
||||||
red_green_scale="e60000,ff0000,ff4000,ff8000,ffc000,ffff00,c0ff00,80ff00,40ff00,00ff00,00e600"
|
red_green_scale="e60000,ff0000,ff4000,ff8000,ffc000,ffff00,c0ff00,80ff00,40ff00,00ff00,00e600"
|
||||||
|
@ -114,6 +114,8 @@ display::display(CVideo& video, const gamemap* map, const config& theme_cfg, con
|
|||||||
selectedHex_(),
|
selectedHex_(),
|
||||||
mouseoverHex_(),
|
mouseoverHex_(),
|
||||||
keys_(),
|
keys_(),
|
||||||
|
animate_map_(true),
|
||||||
|
local_tod_light_(false),
|
||||||
drawing_buffer_(),
|
drawing_buffer_(),
|
||||||
map_screenshot_(false),
|
map_screenshot_(false),
|
||||||
fps_handle_(0),
|
fps_handle_(0),
|
||||||
@ -697,7 +699,7 @@ std::vector<surface> display::get_terrain_images(const map_location &loc,
|
|||||||
|
|
||||||
std::string color_mod;
|
std::string color_mod;
|
||||||
bool use_lightmap = false;
|
bool use_lightmap = false;
|
||||||
bool use_local_light = game_config::local_light;
|
bool use_local_light = local_tod_light_;
|
||||||
if(use_local_light){
|
if(use_local_light){
|
||||||
const time_of_day& tod = get_time_of_day(loc);
|
const time_of_day& tod = get_time_of_day(loc);
|
||||||
|
|
||||||
@ -1936,6 +1938,9 @@ void display::draw(bool update,bool force) {
|
|||||||
if (screen_.update_locked()) {
|
if (screen_.update_locked()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local_tod_light_ = preferences::get("local_tod_light", false);
|
||||||
|
|
||||||
bool changed = draw_init();
|
bool changed = draw_init();
|
||||||
pre_draw();
|
pre_draw();
|
||||||
// invalidate all that needs to be invalidated
|
// invalidate all that needs to be invalidated
|
||||||
|
@ -601,6 +601,9 @@ protected:
|
|||||||
/** Local cache for preferences::animate_map, since it is constantly queried. */
|
/** Local cache for preferences::animate_map, since it is constantly queried. */
|
||||||
bool animate_map_;
|
bool animate_map_;
|
||||||
|
|
||||||
|
/** Local cache for preferences "local_tod_light" */
|
||||||
|
bool local_tod_light_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** Helper structure for rendering the terrains. */
|
/** Helper structure for rendering the terrains. */
|
||||||
struct tblit{
|
struct tblit{
|
||||||
|
@ -107,7 +107,6 @@ namespace game_config
|
|||||||
|
|
||||||
double hex_brightening = 1.5;
|
double hex_brightening = 1.5;
|
||||||
double hex_semi_brightening = 1.25;
|
double hex_semi_brightening = 1.25;
|
||||||
bool local_light = false;
|
|
||||||
|
|
||||||
std::vector<std::string> foot_speed_prefix;
|
std::vector<std::string> foot_speed_prefix;
|
||||||
std::string foot_teleport_enter;
|
std::string foot_teleport_enter;
|
||||||
@ -217,7 +216,6 @@ namespace game_config
|
|||||||
xp_bar_scaling = v["xp_bar_scaling"].to_double(0.5);
|
xp_bar_scaling = v["xp_bar_scaling"].to_double(0.5);
|
||||||
hex_brightening = v["hex_brightening"].to_double(1.5);
|
hex_brightening = v["hex_brightening"].to_double(1.5);
|
||||||
hex_semi_brightening = v["hex_semi_brightening"].to_double(1.25);
|
hex_semi_brightening = v["hex_semi_brightening"].to_double(1.25);
|
||||||
local_light = v["local_light"].to_bool(false);
|
|
||||||
|
|
||||||
foot_speed_prefix = utils::split(v["footprint_prefix"]);
|
foot_speed_prefix = utils::split(v["footprint_prefix"]);
|
||||||
foot_teleport_enter = v["footprint_teleport_enter"].str();
|
foot_teleport_enter = v["footprint_teleport_enter"].str();
|
||||||
|
@ -108,7 +108,6 @@ namespace game_config
|
|||||||
extern double hp_bar_scaling, xp_bar_scaling;
|
extern double hp_bar_scaling, xp_bar_scaling;
|
||||||
extern double hex_brightening;
|
extern double hex_brightening;
|
||||||
extern double hex_semi_brightening;
|
extern double hex_semi_brightening;
|
||||||
extern bool local_light;
|
|
||||||
|
|
||||||
extern std::string flag_rgb;
|
extern std::string flag_rgb;
|
||||||
extern std::vector<Uint32> red_green_scale;
|
extern std::vector<Uint32> red_green_scale;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user