Exemplo n.º 1
0
 public bool DoesChunkMatch(Stamps.TileChunk CompareChunk, Stamps.TileChunk CompareChunk2, int chunkSize = 8)
 {
     for (int x = 0; x < chunkSize; x++)
     {
         for (int y = 0; y < chunkSize; y++)
         {
             if (CompareChunk.TileMapA[x][y] == CompareChunk.TileMapA[x][y])
             {
                 if (CompareChunk.TileMapB[x][y] == CompareChunk.TileMapB[x][y])
                 {
                     continue;
                 }
                 else
                 {
                     return(false);
                 }
             }
             else
             {
                 return(false);
             }
         }
     }
     return(true);
 }
Exemplo n.º 2
0
        public bool DoesChunkMatch(Point point, Stamps.TileChunk CompareChunk, Classes.Scene.EditorLayer EditLayerA, Classes.Scene.EditorLayer EditLayerB, int chunkSize = 8)
        {
            Point TileCoord = new Point(point.X * 128, point.Y * 128);

            for (int x = 0; x < chunkSize; x++)
            {
                for (int y = 0; y < chunkSize; y++)
                {
                    Point p = new Point((TileCoord.X / 16) + x, (TileCoord.Y / 16) + y);
                    if (CompareChunk.TileMapA[x][y] == EditLayerA.GetTileAt(p.X, p.Y))
                    {
                        if (EditLayerB != null)
                        {
                            if (CompareChunk.TileMapB[x][y] == EditLayerB.GetTileAt(p.X, p.Y))
                            {
                                continue;
                            }
                            else
                            {
                                return(false);
                            }
                        }
                        else
                        {
                            continue;
                        }
                    }
                    else
                    {
                        return(false);
                    }
                }
            }
            return(true);
        }
Exemplo n.º 3
0
        public Dictionary <Point, ushort> ConvertChunkSideBtoClipboard(Stamps.TileChunk Chunk)
        {
            ushort[][] ChunkData = Chunk.TileMapB;
            Dictionary <Point, ushort> ClipboardData = new Dictionary <Point, ushort>();

            for (int x = 0; x < Chunk.ChunkSize; x++)
            {
                for (int y = 0; y < Chunk.ChunkSize; y++)
                {
                    ClipboardData.Add(new Point(x, y), ChunkData[x][y]);
                }
            }

            return(ClipboardData);
        }