MantisBT - VCMI
View Issue Details
0003174VCMIGUI - Battlespublic2021-03-13 08:262021-04-04 06:20
0003174: Broken ground sprites in battle screen (Developer git)
Battle screen ground sprites are broken and have a blue box instead of being transparent. Here is a screenshot
Got into a the first battle at the castle door on the scenario All for One.
Used the latest git version
No tags attached.
png Screenshot_2021-03-13_18-03-16.png (690,229) 2021-03-13 08:26
Issue History
2021-03-13 08:26GameslayerNew Issue
2021-03-13 08:26GameslayerFile Added: Screenshot_2021-03-13_18-03-16.png
2021-03-13 09:28NullkillerNote Added: 0008024
2021-03-13 09:29NullkillerNote Edited: 0008024bug_revision_view_page.php?bugnote_id=8024#r3635
2021-04-04 06:20kdmcserNote Added: 0008025

2021-03-13 09:28   
(edited on: 2021-03-13 09:29)
Known issue. Somebody even investigated it and fixed. Something with SDL as far as I remember. On windows with prebuilt vcpkg it does not reproduce but when I built the latest vcpkg isntead I got the same blue rectangles.

Ask about it in slack if you want more details.

2021-04-04 06:20   
when use latest SDL, some images are in blue backgroud, I dont know why, but I use a track fix in client/gui/SDL_Extensions.cpp 827 :

void CSDL_Ext::setDefaultColorKeyPresize(SDL_Surface * surface)


    uint32_t key = mapColor(surface,Colors::DEFAULT_KEY_COLOR);

    auto & color = surface->format->palette->colors[key];

    // set color key only if exactly such color was found

    if (color.r == Colors::DEFAULT_KEY_COLOR.r && color.g == Colors::DEFAULT_KEY_COLOR.g && color.b == Colors::DEFAULT_KEY_COLOR.b) {

        SDL_SetColorKey(surface, SDL_TRUE, key);

+ surface->format->palette->colors[key].a = SDL_ALPHA_TRANSPARENT;