public void WritePalettes(Map map)
{
map.OpenMap(MapTypes.Internal);
map.BW.BaseStream.Position = palettesoffset;
foreach (BSPContainer.Palette_Color[] palette in LightMap_Palettes)
{
for (int x = 0; x < 256; x++)
{
map.BW.Write((byte)palette[x].r);
map.BW.Write((byte)palette[x].g);
map.BW.Write((byte)palette[x].b);
map.BW.Write((byte)palette[x].a);
}
}
map.CloseMap();
}