mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-15 09:02:30 +00:00
attempt to fix hitpoint bar problem on MacOSX
This commit is contained in:
parent
cf77acff84
commit
8718b79aa2
@ -18,7 +18,7 @@
|
||||
canrecruit=1
|
||||
controller=human
|
||||
hitpoints=80
|
||||
recruit=Elvish Hero,Elvish Fighter,Elvish Archer,Horseman,Mage,Elvish Shaman,Red Mage,Spearman,Swordsman,Duelist,Fencer,Elvish Captain,Elvish Ranger,Elvish Shyde,Thief,Rogue,Merman,Elvish Lord,White Mage,Mage of Light
|
||||
recruit=Elvish Hero,Elvish Fighter,Elvish Archer,Horseman,Mage,Elvish Shaman,Red Mage,Spearman,Swordsman,Duelist,Fencer,Elvish Captain,Elvish Ranger,Elvish Shyde,Thief,Rogue,Merman,Elvish Lord,White Mage,Mage of Light,Elvish Sharpshooter
|
||||
gold=800
|
||||
enemy=2
|
||||
[/side]
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 971 B After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 971 B After Width: | Height: | Size: 1.0 KiB |
@ -1200,8 +1200,6 @@ void display::draw_tile(int x, int y, SDL_Surface* unit_image,
|
||||
|
||||
short* startdst = dstlock.pixels() + j*dst->w + xdst;
|
||||
|
||||
const Pixel replace_energy =
|
||||
Pixel(SDL_MapRGBA(energy_image->format,0xFF,0xFF,0xFF,0xFF));
|
||||
const short new_energy = yloc >= show_energy_after ?
|
||||
energy_colour : energy_loss_colour;
|
||||
|
||||
@ -1215,16 +1213,18 @@ void display::draw_tile(int x, int y, SDL_Surface* unit_image,
|
||||
maximum<int>(xoffset,xsrc);
|
||||
|
||||
for(int i = 0; i != len; ++i) {
|
||||
Uint8 r, g, b;
|
||||
SDL_GetRGB(*startenergy,energy_image->format,&r,&g,&b);
|
||||
if(startenergy != NULL && *startenergy != 0) {
|
||||
if(!energy_uses_alpha) {
|
||||
if(*startenergy == replace_energy) {
|
||||
if(r > 230 && g > 230 && b > 230) {
|
||||
*startdst = new_energy;
|
||||
} else {
|
||||
*startdst = *startenergy;
|
||||
}
|
||||
} else {
|
||||
Pixel p = *startenergy;
|
||||
if(*startenergy == replace_energy) {
|
||||
if(r > 230 && g > 230 && b > 230) {
|
||||
p = new_energy;
|
||||
}
|
||||
*startdst = alpha_blend_pixels(p,*startdst,
|
||||
|
Loading…
x
Reference in New Issue
Block a user