remove some spikes

This commit is contained in:
Chris Forbes
2010-06-13 21:42:14 +12:00
parent 3001d58ba0
commit 09b58f46d9

View File

@@ -26,9 +26,15 @@ namespace OpenRA.Graphics
// setup a 1-channel SheetBuilder for our private use // setup a 1-channel SheetBuilder for our private use
if (builder == null) builder = new SheetBuilder(r, TextureChannel.Alpha); if (builder == null) builder = new SheetBuilder(r, TextureChannel.Alpha);
PrecacheColor(Color.White);
PrecacheColor(Color.Red);
}
void PrecacheColor(Color c)
{
// precache glyphs for U+0020 - U+007f // precache glyphs for U+0020 - U+007f
for (var n = (char)0x20; n < (char)0x7f; n++) for (var n = (char)0x20; n < (char)0x7f; n++)
if (glyphs[Pair.New(n, Color.White)] == null) if (glyphs[Pair.New(n, c)] == null)
throw new InvalidOperationException(); throw new InvalidOperationException();
} }