Beispiel #1
0
 //プロジェクトを読み込みしたときの処理
 private void LoadProject(MapInfoFromText mift, string path)
 {
     DXEX.TextureCache.AllTextureDelete();
     mcrm = mcrm.LoadProject(mift, path + @"\MapChip.png");
     sif.LoadProject(mcrm);
     mapEdit = mapEdit.LoadProject(mift, mapWritePanel, mcrm, sif, hScrollBar1, vScrollBar1);
 }
Beispiel #2
0
        public MapChipResourceManager LoadProject(MapInfoFromText mift, string filePath)
        {
            var newMcrm = new MapChipResourceManager(mift.MapChipSize);

            newMcrm.LoadBitmapSheet(mift.LastId, filePath);
            return(newMcrm);
        }
Beispiel #3
0
        //テキストデータからmapData.listをロードする
        public void LoadFromText(MapInfoFromText mift, MapChipResourceManager mcrm)
        {
            int count = 0;

            for (int y = 0; y < mapData.MapSizeY; y++)
            {
                for (int x = 0; x < mapData.MapSizeX; x++)
                {
                    for (int layer = 0; layer < MapEditForm.maxLayer; layer++)
                    {
                        if (mift.Id[count] != -1)
                        {
                            mapData.List[x, y].mapChips[layer].SetTexture(mcrm.GetTexture(mift.Id[count]));
                            mapData.List[x, y].mapChips[layer].SetId(mcrm.GetId(mift.Id[count]));
                            mapData.List[x, y].mapChips[layer].Angle    = mift.Angle[count];
                            mapData.List[x, y].mapChips[layer].turnFlag = mift.Turn[count];
                        }
                        count++;
                    }
                }
            }
        }
 //自殺してからprivateの方のコンストラクタ呼んで再び復活するだけのクソコード
 public MapEditControl LoadProject(MapInfoFromText mift, Panel mwp, MapChipResourceManager mcrm, SelectImageForm sif, HScrollBar hScroll, VScrollBar vScroll)
 {
     this.Dispose();
     return(new MapEditControl(mift, mwp, mcrm, hScroll, vScroll));
 }
 //miftの情報からmwsのmapData.listを構築する
 private MapEditControl(MapInfoFromText mift, Panel mwp, MapChipResourceManager mcrm, HScrollBar hScroll, VScrollBar vScroll) :
     this(mwp, hScroll, vScroll, mift.MapSize, mift.MapChipSize)
 {
     MapDataControl.LoadMapDataList.LoadFromText(mift, mcrm);
 }