Пример #1
0
        public FieldItemEditor(MainSave sav)
        {
            SAV = sav;
            InitializeComponent();

            Items = new FieldItemManager(SAV.GetFieldItems());

            var l1 = Items.Layer1;

            Scale1    = new int[l1.GridWidth * l1.GridHeight];
            ScaleX    = new int[Scale1.Length * AcreScale * AcreScale];
            ScaleAcre = new Bitmap(l1.GridWidth * AcreScale, l1.GridHeight * AcreScale);

            Map        = new int[l1.MapWidth * l1.MapHeight * MapScale * MapScale];
            MapReticle = new Bitmap(l1.MapWidth * MapScale, l1.MapHeight * MapScale);

            foreach (var acre in MapGrid.Acres)
            {
                CB_Acre.Items.Add(acre.Name);
            }

            PG_Tile.SelectedObject = new FieldItem();
            CB_Acre.SelectedIndex  = 0;
            LoadGrid(X, Y);
        }
Пример #2
0
        public FieldItemEditor(MainSave sav)
        {
            InitializeComponent();
            this.TranslateInterface(GameInfo.CurrentLanguage);

            SAV   = sav;
            Items = new FieldItemManager(SAV.GetFieldItems());

            var l1 = Items.Layer1;

            Scale1    = new int[l1.GridWidth * l1.GridHeight];
            ScaleX    = new int[Scale1.Length * AcreScale * AcreScale];
            ScaleAcre = new Bitmap(l1.GridWidth * AcreScale, l1.GridHeight * AcreScale);

            Map        = new int[l1.MapWidth * l1.MapHeight * MapScale * MapScale];
            MapReticle = new Bitmap(l1.MapWidth * MapScale, l1.MapHeight * MapScale);

            Terrain = new TerrainManager(sav.GetTerrain());
            PB_Map.BackgroundImage = TerrainSprite.CreateMap(Terrain, 2);

            foreach (var acre in MapGrid.Acres)
            {
                CB_Acre.Items.Add(acre.Name);
            }

            PG_Tile.SelectedObject = new FieldItem();
            CB_Acre.SelectedIndex  = 0;
            LoadGrid(X, Y);
        }