Don't use (semi-)brightened cache when disabled (as it is currently in trunk)

This commit is contained in:
Ali El Gariani 2010-07-28 23:13:50 +00:00
parent 87af7c0191
commit afefa8996c

View file

@ -1034,6 +1034,20 @@ surface get_image(const image::locator& i_locator, TYPE type)
bool is_unscaled = false;
//translate type to a simpler one when possible
switch(type) {
case BRIGHTENED:
if(ftofxp(game_config::hex_brightening) == ftofxp(1.0))
type = SCALED_TO_HEX;
break;
case SEMI_BRIGHTENED:
if(ftofxp(game_config::hex_semi_brightening) == ftofxp(1.0))
type = SCALED_TO_HEX;
break;
default:
break;
}
switch(type) {
case UNSCALED:
is_unscaled = true;