Mercurial > repos > IBBoard.ArmyBuilder.API
changeset 2:d5ba733cd289
Re #77 - Identify fields in .ab files
* Rename "UnknownNumber" to "UniqueID" based on data in "update XML" files
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 20 Apr 2009 19:28:01 +0000 |
parents | 1c19230d568d |
children | 1a54f6afafe7 |
files | ABFile.cs Loaders/ArmyBuilderABFileLoader.cs |
diffstat | 2 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/ABFile.cs Sun Apr 19 11:38:29 2009 +0000 +++ b/ABFile.cs Mon Apr 20 19:28:01 2009 +0000 @@ -25,7 +25,7 @@ private string releaseMinor = ""; private string requiredMajorVersion = ""; private string requiredMinorVersion = ""; - private string unknownNumber = ""; + private string uniqueID = ""; private string exporter = ""; private string comment = ""; private List<FileTableEntry> files; @@ -78,6 +78,8 @@ public string Header { + //This may actually be three values - a standard header ("LWDExport"), a count of the number of header parts (? seemingly always 0A) + // and an app name ("Army Builder" or "Card Value") get { return header; @@ -170,15 +172,15 @@ } } - public string UnknownNumber + public string UniqueID { get { - return unknownNumber; + return uniqueID; } set { - unknownNumber = value; + uniqueID = value; } }
--- a/Loaders/ArmyBuilderABFileLoader.cs Sun Apr 19 11:38:29 2009 +0000 +++ b/Loaders/ArmyBuilderABFileLoader.cs Mon Apr 20 19:28:01 2009 +0000 @@ -46,7 +46,7 @@ abFile.ReleaseMinor = reader.ReadDelimitedString(HEADER_DELIMITER); abFile.RequiredMajorVersion = reader.ReadDelimitedString(HEADER_DELIMITER); abFile.RequiredMinorVersion = reader.ReadDelimitedString(HEADER_DELIMITER); - abFile.UnknownNumber = reader.ReadDelimitedString(HEADER_DELIMITER); + abFile.UniqueID = reader.ReadDelimitedString(HEADER_DELIMITER); abFile.Exporter = reader.ReadDelimitedString(HEADER_DELIMITER); int bytesRead = CalculateFileInfoSize(abFile); @@ -59,7 +59,7 @@ private static int CalculateFileInfoSize(ABFile file) { return file.Header.Length + file.GameName.Length + file.FolderName.Length + file.ReleaseMajor.Length + file.ReleaseMinor.Length + - file.RequiredMajorVersion.Length + file.RequiredMinorVersion.Length + file.UnknownNumber.Length + file.Exporter.Length + 9; + file.RequiredMajorVersion.Length + file.RequiredMinorVersion.Length + file.UniqueID.Length + file.Exporter.Length + 9; } private static void ReadFileTable(ABFile abFile, BinaryReaderBigEndian reader)