Permalink
Browse files

WINTERMUTE: Used colorToARGB for color casting

  • Loading branch information...
lolbot-iichan committed Aug 29, 2018
1 parent 2c0ea02 commit b6197aef2e922724ac049822ab4d162b30b71e5f
Showing with 1 addition and 4 deletions.
  1. +1 −4 engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp
@@ -276,10 +276,7 @@ uint32 BaseSurfaceOSystem::getPixelAt(Graphics::Surface *surface, int x, int y)
//////////////////////////////////////////////////////////////////////////
bool BaseSurfaceOSystem::getPixel(int x, int y, byte *r, byte *g, byte *b, byte *a) {
uint32 pixel = getPixelAt(_surface, x, y);
*r = (pixel >> 24) & 255;
*g = (pixel >> 16) & 255;
*b = (pixel >> 8) & 255;
*a = pixel & 255;
_surface->format.colorToARGB(pixel, *a, *r, *g, *b);
return STATUS_OK;
}

0 comments on commit b6197ae

Please sign in to comment.