TINYGL: Expect colorKey in the same pixel format as surface.
So caller does not have to depend on the pixel format used internally to BlitImage. Update callers which do request for color keying (GRIM/EMI only). Also, remove a special-casing of transparent color when converting image format which sets a color in a packed format independent from actual destination format. Also, in GfxTinyGL::createTextObject, prefer changing invisible colorKey value than actually-visible color.
This commit is contained in:
parent
31517c227c
commit
7c1a15c6e8
3 changed files with 11 additions and 18 deletions
|
@ -52,7 +52,7 @@ public:
|
|||
if (applyColorKey) {
|
||||
for (int x = 0; x < surface.w; x++) {
|
||||
for (int y = 0; y < surface.h; y++) {
|
||||
uint32 pixel = dataBuffer.getValueAt(y * surface.w + x);
|
||||
uint32 pixel = buffer.getValueAt(y * surface.w + x);
|
||||
if (pixel == colorKey) {
|
||||
// Color keyed pixels become transparent white.
|
||||
dataBuffer.setPixelAt(y * surface.w + x, 0, 255, 255, 255);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue