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)
|
||||
* It is now possible to remove multiple installed add-ons at the same
|
||||
time
|
||||
* Slowed units are now tinted to be recognizable at a glance
|
||||
* WML engine:
|
||||
* Readded the liminal alignment
|
||||
* 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
|
||||
format to be used.
|
||||
* Reenabled "delay shroud updates".
|
||||
* Slowed units are now tinted to be recognizable at a glance.
|
||||
|
||||
* Miscellaneous and bug fixes:
|
||||
* Reintroduced the "Liminal" alignment. Liminal units fight best during
|
||||
|
|
23
src/unit.cpp
23
src/unit.cpp
|
@ -1863,10 +1863,27 @@ void unit::redraw_unit()
|
|||
}
|
||||
params.y -= height_adjust;
|
||||
params.halo_y -= height_adjust;
|
||||
if (get_state(STATE_POISONED)){
|
||||
params.blend_with = disp.rgb(0,255,0);
|
||||
params.blend_ratio = 0.25;
|
||||
|
||||
int red = 0,green = 0,blue = 0,tints = 0;
|
||||
double blend_ratio = 0;
|
||||
// Add future colored states here
|
||||
if(get_state(STATE_POISONED)) {
|
||||
green += 255;
|
||||
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
|
||||
// we use image_mod on the primary image
|
||||
// and halo_mod on secondary images and all haloes
|
||||
|
|
Loading…
Add table
Reference in a new issue