Remove MakeColor

This commit is contained in:
twinaphex 2014-06-22 00:29:39 +02:00
parent 1d155ea504
commit fa08c4a6ad
2 changed files with 2 additions and 13 deletions

View File

@ -81,11 +81,6 @@ class MDFN_PixelFormat
};
uint8 Ashift; // [...] alpha component.
// Creates a color value for the surface corresponding to the 8-bit R/G/B/A color passed.
INLINE uint32 MakeColor(uint8 r, uint8 g, uint8 b, uint8 a = 0) const
{
return MAKECOLOR(r, g, b, a);
}
}; // MDFN_PixelFormat;
// Supports 32-bit RGBA
@ -117,12 +112,6 @@ class MDFN_Surface //typedef struct
MDFN_PixelFormat format;
void SetFormat(const MDFN_PixelFormat &new_format, bool convert);
// Creates a value for the surface corresponding to the R/G/B/A color passed.
INLINE uint32 MakeColor(uint8 r, uint8 g, uint8 b, uint8 a = 0) const
{
return MAKECOLOR(r, g, b, a);
}
private:
void Init(void *const p_pixels, const uint32 p_width, const uint32 p_height, const uint32 p_pitchinpix, const MDFN_PixelFormat &nf);
};

View File

@ -275,7 +275,7 @@ void WSwan_SetPixelFormat(const MDFN_PixelFormat &format)
neo_g = g * 17;
neo_b = b * 17;
ColorMap[(r << 8) | (g << 4) | (b << 0)] = format.MakeColor(neo_r, neo_g, neo_b); //(neo_r << rs) | (neo_g << gs) | (neo_b << bs);
ColorMap[(r << 8) | (g << 4) | (b << 0)] = MAKECOLOR(neo_r, neo_g, neo_b, 0); //(neo_r << rs) | (neo_g << gs) | (neo_b << bs);
}
for(int i = 0; i < 16; i++)
@ -286,7 +286,7 @@ void WSwan_SetPixelFormat(const MDFN_PixelFormat &format)
neo_g = (i) * 17;
neo_b = (i) * 17;
ColorMapG[i] = format.MakeColor(neo_r, neo_g, neo_b); //(neo_r << rs) | (neo_g << gs) | (neo_b << bs);
ColorMapG[i] = MAKECOLOR(neo_r, neo_g, neo_b, 0); //(neo_r << rs) | (neo_g << gs) | (neo_b << bs);
}
}