コード例 #1
0
ファイル: Importer.cs プロジェクト: Zarby89/ZScream-Exporter
    public void LoadOverworldTiles()
    {
        overworld.AssembleMap16Tiles(true);

        for (int i = 0; i < 160; i++)
        {
            all_maps[i] = JsonConvert.DeserializeObject <MapSave>(File.ReadAllText("ProjectDirectory//Overworld//Maps//Map" + i.ToString("D3") + ".json"));

            overworld.AllMapTilesFromMap(i, all_maps[i].tiles);
            if (i == 159)
            {
                string s    = "";
                int    tpos = 0;
                for (int y = 0; y < 16; y++)
                {
                    for (int x = 0; x < 16; x++)
                    {
                        Tile32 map16 = new Tile32(all_maps[i].tiles[(x * 2), (y * 2)], all_maps[i].tiles[(x * 2) + 1, (y * 2)], all_maps[i].tiles[(x * 2), (y * 2) + 1], all_maps[i].tiles[(x * 2) + 1, (y * 2) + 1]);
                        s += "[" + map16.tile0.ToString("D4") + "," + map16.tile1.ToString("D4") + "," + map16.tile2.ToString("D4") + "," + map16.tile3.ToString("D4") + "] ";
                        tpos++;
                    }
                    s += "\r\n";
                }
                File.WriteAllText("TileDebug2.txt", s);
            }
        }
        byte[] largemaps = getLargeMaps();
        overworld.createMap32TilesFrom16();
        overworld.savemapstorom();


        WriteLog("Overworld tiles data loaded properly", Color.Green);
    }