public ItemDatSingle(System.IO.Stream stream, System.IO.Stream sortStream, EndianUtils.Endianness endian) // 0x2E4 { long pos = stream.Position; stream.Position = pos + 0x04; NamePointer = stream.ReadUInt32().FromEndian(endian); stream.Position = pos + 0x20; ItemString = stream.ReadAscii(0x20); stream.Position = pos + 0x44; DescriptionPointer = stream.ReadUInt32().FromEndian(endian); stream.Position = pos; Data = new UInt32[0x2E4 / 4]; for (int i = 0; i < 0x2E4 / 4; ++i) { Data[i] = stream.ReadUInt32().FromEndian(endian); } SortOrderPerCategory = new uint[11]; for (int i = 0; i < 11; ++i) { SortOrderPerCategory[i] = sortStream.ReadUInt32().FromEndian(endian); } return; }
private bool LoadFile(System.IO.Stream stream, Util.Endianness endian, Util.Bitness bits) { string magic = stream.ReadAscii(8); if (magic != "T8BTMA ") { return(false); } uint arteCount = stream.ReadUInt32().FromEndian(endian); uint stringStart = stream.ReadUInt32().FromEndian(endian); ArteList = new List <Arte>((int)arteCount); for (uint i = 0; i < arteCount; ++i) { Arte a = new Arte(stream, stringStart, endian, bits); ArteList.Add(a); } ArteIdDict = new Dictionary <uint, Arte>(ArteList.Count); foreach (var arte in ArteList) { ArteIdDict.Add(arte.InGameID, arte); } return(true); }
private bool LoadFile(System.IO.Stream stream, Util.Endianness endian, Util.Bitness bits) { string magic = stream.ReadAscii(8); if (magic != "TO8MAPL\0") { return(false); } uint filesize = stream.ReadUInt32().FromEndian(endian); uint liststart = stream.ReadUInt32().FromEndian(endian); uint mapcount = stream.ReadUInt32().FromEndian(endian); uint textstart = stream.ReadUInt32().FromEndian(endian); uint littleEndianFilesize = stream.ReadUInt32().FromEndian(Util.Endianness.LittleEndian); // ??? MapNames = new List <MapName>(); stream.Position = liststart; for (uint i = 0; i < mapcount; ++i) { MapNames.Add(new MapName(stream, textstart, endian, bits)); } return(true); }
public Title(System.IO.Stream stream) { ID = stream.ReadUInt32().SwapEndian(); NameStringDicID = stream.ReadUInt32().SwapEndian(); DescStringDicID = stream.ReadUInt32().SwapEndian(); Character = stream.ReadUInt32().SwapEndian(); CostumeString = stream.ReadAscii(0x10).TrimNull(); BunnyGuildPointsMaybe = stream.ReadUInt32().SwapEndian(); stream.DiscardBytes(0xC); }
public ItemDatSingle(System.IO.Stream stream, Util.Endianness endian) // 0x2E4 { long pos = stream.Position; stream.Position = pos + 0x04; NamePointer = stream.ReadUInt32().FromEndian(endian); stream.Position = pos + 0x20; ItemString = stream.ReadAscii(0x20); stream.Position = pos + 0x44; DescriptionPointer = stream.ReadUInt32().FromEndian(endian); stream.Position = pos; Data = new UInt32[0x2E4 / 4]; for (int i = 0; i < 0x2E4 / 4; ++i) { Data[i] = stream.ReadUInt32().FromEndian(endian); } return; }
public NAME(System.IO.Stream stream) : base(stream) { stream.ReadAlign(0x10); Filename = stream.ReadAscii((int)SectionSize).TrimNull(); }