This Trac instance is not used for development anymore!

We migrated our development workflow to git and Gitea.
To test the future redirection, replace trac by ariadne in the page URL.

Changeset 10083 for ps


Ignore:
Timestamp:
08/24/11 02:28:48 (13 years ago)
Author:
ben
Message:

Don't render neutral territory borders on minimap.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ps/trunk/source/graphics/TerritoryTexture.cpp

    r10034 r10083  
    196196
    197197            CColor color(1, 0, 1, 1);
    198             if (val < colors.size())
     198            // Force neutral territories to pure white, so that later we can omit them from the texture
     199            if (val == 0)
     200                color = CColor(1, 1, 1, 0);
     201            else if (val < colors.size())
    199202                color = colors[val];
    200203
     
    267270        }
    268271    }
    269 }
     272
     273    // Don't show neutral territory boundaries
     274    for (ssize_t j = 0; j < h; ++j)
     275    {
     276        for (ssize_t i = 0; i < w; ++i)
     277        {
     278            ssize_t idx = (j*w+i)*4;
     279            if (bitmap[idx] == 255 && bitmap[idx+1] == 255 && bitmap[idx+2] == 255)
     280                bitmap[idx+3] = 0;
     281        }
     282    }
     283}
Note: See TracChangeset for help on using the changeset viewer.