internal void DrawOverlays(Helpers.ZBufferedTexture T) { if (OverlayTypeIndex != -1) { var OTypes = CCFactory <OverlayTypeClass, OverlayClass> .Get().FactoryItems; var OT = OTypes[OverlayTypeIndex]; var pos = TacticalPosition + new CellStruct(30, 15) + OverlayPosition; pos.Y -= (2);// + OverlayPosition.Y); var tImage = OT.SHPImage.Value; if (OT.Tiberium) { var ix = OverlayClass.OverlayToTiberium(OverlayTypeIndex); if (ix != -1) { var t = TiberiumClass.All[ix]; OverlayTypeClass tOverlay; if (Slope != 0) { tOverlay = OTypes[t.NumImages + t.NumExtraImages / 4 * (Slope - 1) + t.Overlay.ArrayIndex]; } else { tOverlay = OTypes[t.Overlay.ArrayIndex + X * Y % t.NumImages]; } // tImage.DrawIntoTexture(T, pos, (uint)OverlayState, MapTheater.TemperatePAL); } } else if (OT.Wall) { // tImage.DrawIntoTexture(T, pos, (uint)OverlayState, MapTheater.unitPAL); } } }
private void LoadMap() { //if (Map.Preview != null) { // MapPreview = Map.GetPreviewTexture(GraphicsDevice); //} else { // MapPreview = null; //} Map.Initialize(); Tactical.SetMap(Map); INI.Rules_Combined = new INI(); INI.Rules_Combined.CombineWithFile(INI.Rules_INI); INI.Rules_Combined.CombineWithFile(Map.MapFile); TiberiumClass.LoadListFromINI(INI.Rules_Combined); OverlayTypeClass.LoadListFromINI(INI.Rules_Combined); IsoTileTypeClass.LoadListFromINI(Map.TheaterData, true); IsoTileTypeClass.PrepaintTiles(); TiberiumClass.All.ReadAllFromINI(INI.Rules_Combined); CCFactory <OverlayTypeClass, OverlayClass> .Get().ReadAllFromINI(INI.Rules_Combined); Map.SetupOverlays(); }