Make Color use uint for ARGB.
This is a more natural representation than int that allows removal of casts in many places that require uint. Additionally, we can change the internal representation from long to uint, making the Color struct smaller. Since arrays of colors are common, this can save on memory.
This commit is contained in:
@@ -68,7 +68,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
// Generate palette in HSV
|
||||
fixed (byte* cc = &buffer[0])
|
||||
{
|
||||
var c = (int*)cc;
|
||||
var c = (uint*)cc;
|
||||
for (var v = 0; v < 256; v++)
|
||||
{
|
||||
for (var s = 0; s < 256; s++)
|
||||
|
||||
Reference in New Issue
Block a user