Moved Graphics::PixelFormat into its own header file; turned RGBToColor etc. into methods, and added an operator==

svn-id: r35993
This commit is contained in:
Max Horn 2009-01-22 04:35:10 +00:00
parent a2c671da97
commit abc06ca18e
12 changed files with 120 additions and 71 deletions

View file

@ -399,7 +399,7 @@ void GraphicsWidget::setGfx(int w, int h, int r, int g, int b) {
OverlayColor *dst = (OverlayColor*)_gfx.pixels;
Graphics::PixelFormat overlayFormat = g_system->getOverlayFormat();
OverlayColor fillCol = Graphics::RGBToColor(r, g, b, overlayFormat);
OverlayColor fillCol = overlayFormat.RGBToColor(r, g, b);
while (h--) {
for (int i = 0; i < w; ++i) {
*dst++ = fillCol;