void InitPalettes()
{
_shadowPalette = new byte[Game.Version >= 7 ? NumShadowPalette * 256 : 256];
if (Game.Version <= 1)
{
if (Game.Platform == Platform.Apple2GS || Game.Platform == Platform.C64)
{
SetPalette(Palette.C64);
}
else
{
SetPalette(Palette.V1);
if (Game.GameId == GameId.Zak)
SetPalColor(15, 170, 170, 170);
}
}
else if (Game.Features.HasFlag(GameFeatures.SixteenColors))
{
if ((_game.Platform == Platform.Amiga) || (_game.Platform == Platform.AtariST))
SetPalette(Palette.Amiga);
else
{
Array.Copy(Palette.Ega.Colors, _currentPalette.Colors, Palette.Ega.Colors.Length);
_gfxManager.SetPalette(_currentPalette.Colors);
}
for (int i = 0; i < 256; i++)
_shadowPalette[i] = (byte)i;
}
else if ((Game.Platform == Platform.Amiga) && Game.Version == 4)
{
// if rendermode is set to EGA we use the full palette from the resources
// else we initialize and then lock down the first 16 colors.
SetPalette(Palette.AmigaMonkeyIsland);
}
else if (Game.Platform == Platform.FMTowns)
{
if (Game.GameId == GameId.Indy4 || Game.GameId == GameId.Monkey2)
_townsClearLayerFlag = 0;
else if (Game.GameId == GameId.Loom)
TownsSetTextPalette(Palette.TownsLoom);
else if (Game.Version == 3)
TownsSetTextPalette(Palette.Towns3);
_townsScreen.ToggleLayers(_townsActiveLayerFlags);
}
for (int i = 0; i < 256; i++)
Gdi.RoomPalette[i] = (byte)i;
}