Formatting FIxes (#58)

This commit is contained in:
Kamron Batman 2019-10-04 23:08:13 -07:00 • committed by GitHub
parent 57fb9fb525
commit 096d39609e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1318 changed files with 11633 additions and 22129 deletions

View file

@ -30,25 +30,25 @@ namespace Server
Table = new Rectangle2D[TileData.ItemTable.Length];
if (File.Exists("Data/Binary/Bounds.bin"))
using (FileStream fs = new FileStream("Data/Binary/Bounds.bin", FileMode.Open, FileAccess.Read,
FileShare.Read))
{
using FileStream fs = new FileStream("Data/Binary/Bounds.bin", FileMode.Open, FileAccess.Read,
FileShare.Read);
BinaryReader bin = new BinaryReader(fs);
int count = Math.Min(Table.Length, (int)(fs.Length / 8));
for (int i = 0; i < count; ++i)
{
BinaryReader bin = new BinaryReader(fs);
int xMin = bin.ReadInt16();
int yMin = bin.ReadInt16();
int xMax = bin.ReadInt16();
int yMax = bin.ReadInt16();
int count = Math.Min(Table.Length, (int)(fs.Length / 8));
for (int i = 0; i < count; ++i)
{
int xMin = bin.ReadInt16();
int yMin = bin.ReadInt16();
int xMax = bin.ReadInt16();
int yMax = bin.ReadInt16();
Table[i].Set(xMin, yMin, xMax - xMin + 1, yMax - yMin + 1);
}
bin.Close();
Table[i].Set(xMin, yMin, xMax - xMin + 1, yMax - yMin + 1);
}
bin.Close();
}
else
Console.WriteLine("Warning: Data/Binary/Bounds.bin does not exist");
}