MantisBT - VCMI
View Issue Details
0000982VCMIGUI - Battlespublic2012-05-27 10:202014-05-30 17:41
Tow 
Ivan 
normalminorhave not tried
closedfixed 
 
0.89 
0000982: Borders around creature portraits in stack queue are not visible
Start battle using resolution higher than 800x600, so the full version of stack queue is present. It displays its background and creatures but it's missing background ( CHRROP.pcx ).

The problem seems related to recent blitting reorganziation.

In the CStackQueue::StackBox::showAll method the line:
    CSDL_Ext::blit8bppAlphaTo24bpp(bg, NULL, to, &temp_rect);
is supposed to blit border image.
However, if you test it (ie. by putting SDL_SaveBMP(to, "to.bmp") after it) it apparently is still not visible.

If I comment out the blit8bppAlphaTo24bpp line and restore the following blitAt line, issue is gone. It is not what I would expect. I suspect it may be 0/255 opaque/transparent interpretation mismatch.
No tags attached.
Issue History
2012-05-27 10:20TowNew Issue
2012-05-27 10:20TowStatusnew => assigned
2012-05-27 10:20TowAssigned To => Ivan
2012-05-27 10:20TowProduct Version0.89 => 0.dev
2012-05-27 11:52IvanNote Added: 0002571
2012-05-27 13:23TowNote Added: 0002572
2012-05-27 14:08IvanNote Added: 0002573
2012-05-27 14:08IvanStatusassigned => resolved
2012-05-27 14:08IvanFixed in Version => 0.89
2012-05-27 14:08IvanResolutionopen => fixed
2014-05-30 17:41beegeeStatusresolved => closed

Notes
(0002571)
Ivan   
2012-05-27 11:52   
Interesting. I've changed alpha to match values in SDL:
#define SDL_ALPHA_OPAQUE 255
#define SDL_ALPHA_TRANSPARENT 0

But indexed images loaded via SDL have color.unused set to zero. I suppose we have to set it manually.

I agree that blit8to24 is broken (will fix) but why you're using it here? If blitting via SDL works we should use it instead.
(0002572)
Tow   
2012-05-27 13:23   
> I agree that blit8to24 is broken (will fix) but why you're using it here? If blitting via SDL works we should use it instead.

You're right, there is no good reason to use 8to24 blit there. I'll change that later. Consider this report to be about alpha values mismatch in our graphics. I just noticed the issue on that particular example. :)
(0002573)
Ivan   
2012-05-27 14:08   
fixed in rev 2721