Skip to content

Commit

Permalink
file tile header
Browse files Browse the repository at this point in the history
  • Loading branch information
BinaryConstruct committed Sep 30, 2022
1 parent c00351b commit c9c7a33
Showing 1 changed file with 2 additions and 54 deletions.
56 changes: 2 additions & 54 deletions src/TEdit/Terraria/Tile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,58 +141,6 @@ public static bool StopsWalls(ushort type)
type == (ushort)TileType.TallGateClosed;
}

#region BitFlags
//private const int IsActivePosition = 0;
//private const int IsLavaPosition = 1;
//private const int HasWirePosition = 2;

// Condense all bools to one byte, slow saves ~100mb memory in large world,
//private byte _flags;
//public bool IsActive
//{
// set
// {
// if (value)
// _flags = (byte)(_flags | (1 << (IsActivePosition%8)));
// else
// _flags = (byte)(_flags & ~(1 << (IsActivePosition % 8)));
// }
// get
// {
// return (_flags & (1 << (IsActivePosition % 8))) != 0;
// }
//}

//public bool WireRed
//{
// set
// {
// if (value)
// _flags = (byte)(_flags | (1 << (HasWirePosition % 8)));
// else
// _flags = (byte)(_flags & ~(1 << (HasWirePosition % 8)));
// }
// get
// {
// return (_flags & (1 << (HasWirePosition % 8))) != 0;
// }
//}
//public bool IsLava
//{
// set
// {
// if (value)
// _flags = (byte)(_flags | (1 << (IsLavaPosition % 8)));
// else
// _flags = (byte)(_flags & ~(1 << (IsLavaPosition % 8)));
// }
// get
// {
// return (_flags & (1 << (IsLavaPosition % 8))) != 0;
// }
//}
#endregion

public Vector2Short GetUV() => new Vector2Short(U, V);

public object Clone()
Expand All @@ -218,8 +166,8 @@ public void Reset()
WireGreen = false;
WireRed = false;
WireYellow = false;
FullBrightBlock = true;
FullBrightWall = true;
FullBrightBlock = false;
FullBrightWall = false;
InvisibleBlock = false;
InvisibleWall = false;
}
Expand Down

0 comments on commit c9c7a33

Please sign in to comment.