Slowed units are now tinted to be recognizable at a glance
This commit is contained in:
parent
bdfc1307ba
commit
7022a771a8
3 changed files with 22 additions and 3 deletions
|
@ -62,6 +62,7 @@ Version 1.9.9+svn:
|
||||||
* Chanaged: Disable pango markup in unit names (bug #17788)
|
* Chanaged: Disable pango markup in unit names (bug #17788)
|
||||||
* It is now possible to remove multiple installed add-ons at the same
|
* It is now possible to remove multiple installed add-ons at the same
|
||||||
time
|
time
|
||||||
|
* Slowed units are now tinted to be recognizable at a glance
|
||||||
* WML engine:
|
* WML engine:
|
||||||
* Readded the liminal alignment
|
* Readded the liminal alignment
|
||||||
* Added four-difficulty versions of certain macros: QUANTITY4,
|
* Added four-difficulty versions of certain macros: QUANTITY4,
|
||||||
|
|
|
@ -48,6 +48,7 @@ Version 1.9.9+svn:
|
||||||
* Added option in advanced preferences that allows the twelve-hour clock
|
* Added option in advanced preferences that allows the twelve-hour clock
|
||||||
format to be used.
|
format to be used.
|
||||||
* Reenabled "delay shroud updates".
|
* Reenabled "delay shroud updates".
|
||||||
|
* Slowed units are now tinted to be recognizable at a glance.
|
||||||
|
|
||||||
* Miscellaneous and bug fixes:
|
* Miscellaneous and bug fixes:
|
||||||
* Reintroduced the "Liminal" alignment. Liminal units fight best during
|
* Reintroduced the "Liminal" alignment. Liminal units fight best during
|
||||||
|
|
21
src/unit.cpp
21
src/unit.cpp
|
@ -1863,10 +1863,27 @@ void unit::redraw_unit()
|
||||||
}
|
}
|
||||||
params.y -= height_adjust;
|
params.y -= height_adjust;
|
||||||
params.halo_y -= height_adjust;
|
params.halo_y -= height_adjust;
|
||||||
|
|
||||||
|
int red = 0,green = 0,blue = 0,tints = 0;
|
||||||
|
double blend_ratio = 0;
|
||||||
|
// Add future colored states here
|
||||||
if(get_state(STATE_POISONED)) {
|
if(get_state(STATE_POISONED)) {
|
||||||
params.blend_with = disp.rgb(0,255,0);
|
green += 255;
|
||||||
params.blend_ratio = 0.25;
|
blend_ratio += 0.25;
|
||||||
|
tints += 1;
|
||||||
}
|
}
|
||||||
|
if(get_state(STATE_SLOWED)) {
|
||||||
|
red += 191;
|
||||||
|
green += 191;
|
||||||
|
blue += 255;
|
||||||
|
blend_ratio += 0.25;
|
||||||
|
tints += 1;
|
||||||
|
}
|
||||||
|
if(tints > 0) {
|
||||||
|
params.blend_with = disp.rgb((red/tints),(green/tints),(blue/tints));
|
||||||
|
params.blend_ratio = ((blend_ratio/tints));
|
||||||
|
}
|
||||||
|
|
||||||
//hackish : see unit_frame::merge_parameters
|
//hackish : see unit_frame::merge_parameters
|
||||||
// we use image_mod on the primary image
|
// we use image_mod on the primary image
|
||||||
// and halo_mod on secondary images and all haloes
|
// and halo_mod on secondary images and all haloes
|
||||||
|
|
Loading…
Add table
Reference in a new issue