Ejemplo n.º 1
0
 public MemTile(MemTile copy)
 {
     if (copy == null)
     {
         this.type = 0;
         this.wall = 0;
         this.liquid = 0;
         this.sTileHeader = 0;
         this.bTileHeader = 0;
         this.bTileHeader2 = 0;
         this.bTileHeader3 = 0;
         this.frameX = 0;
         this.frameY = 0;
         return;
     }
     this.type = copy.type;
     this.wall = copy.wall;
     this.liquid = copy.liquid;
     this.sTileHeader = copy.sTileHeader;
     this.bTileHeader = copy.bTileHeader;
     this.bTileHeader2 = copy.bTileHeader2;
     this.bTileHeader3 = copy.bTileHeader3;
     this.frameX = copy.frameX;
     this.frameY = copy.frameY;
 }
Ejemplo n.º 2
0
        public bool isTheSameAs(MemTile compTile)
        {
            if (compTile == null)
            {
                return false;
            }
            if (this.sTileHeader != compTile.sTileHeader)
            {
                return false;
            }
            if (this.active())
            {
                if (this.type != compTile.type)
                {
                    return false;
                }

            #if Full_API
                if (Terraria.Main.tileFrameImportant[(int)this.type] && (this.frameX != compTile.frameX || this.frameY != compTile.frameY))
                {
                    return false;
                }
            #endif
            }
            if (this.wall != compTile.wall || this.liquid != compTile.liquid)
            {
                return false;
            }
            if (compTile.liquid == 0)
            {
                if (this.wallColor() != compTile.wallColor())
                {
                    return false;
                }
            }
            else if (this.bTileHeader != compTile.bTileHeader)
            {
                return false;
            }
            return true;
        }
Ejemplo n.º 3
0
 public bool HasSameSlope(MemTile tile)
 {
     return (this.sTileHeader & 29696) == (tile.sTileHeader & 29696);
 }
Ejemplo n.º 4
0
 public void CopyFrom(MemTile from)
 {
     this.type = from.type;
     this.wall = from.wall;
     this.liquid = from.liquid;
     this.sTileHeader = from.sTileHeader;
     this.bTileHeader = from.bTileHeader;
     this.bTileHeader2 = from.bTileHeader2;
     this.bTileHeader3 = from.bTileHeader3;
     this.frameX = from.frameX;
     this.frameY = from.frameY;
 }
Ejemplo n.º 5
0
 public unsafe void SetTile(int x, int y, MemTile tile)
 {
     HeapTile heapTile = new HeapTile(tileData, x, y);
     heapTile.CopyFrom(tile);
 }