mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add ControlType, fix a bunch of numerics
This commit is contained in:
@@ -255,23 +255,11 @@ namespace SabreTools.Library.DatFiles
|
||||
var dataArea = new DataArea
|
||||
{
|
||||
Name = reader.GetAttribute("name"),
|
||||
Size = Sanitizer.CleanLong(reader.GetAttribute("size")),
|
||||
Width = Sanitizer.CleanLong(reader.GetAttribute("width")),
|
||||
Endianness = reader.GetAttribute("endianness").AsEndianness(),
|
||||
};
|
||||
|
||||
// Set the size
|
||||
if (reader.GetAttribute("size") != null)
|
||||
{
|
||||
if (Int64.TryParse(reader.GetAttribute("width"), out long size))
|
||||
dataArea.Size = size;
|
||||
}
|
||||
|
||||
// Set the width
|
||||
if (reader.GetAttribute("width") != null)
|
||||
{
|
||||
if (Int64.TryParse(reader.GetAttribute("width"), out long width))
|
||||
dataArea.Width = width;
|
||||
}
|
||||
|
||||
List<DatItem> roms = ReadDataArea(reader.ReadSubtree(), dataArea);
|
||||
|
||||
// If we got valid roms, add them to the list
|
||||
|
||||
Reference in New Issue
Block a user