public Inclusion Read(DAIIO io) { ID = io.ReadInt24(); var count = io.ReadUInt16(); Name = io.ReadString(count); count = io.ReadUInt16(); Value = io.ReadString(count); return(this); }
public CharacterCustomizationManager Read(DAIIO io) { xLength = io.ReadBit2(LengthBits); Version = io.ReadInt32(); ClassId = io.ReadInt32(); BackgroundId = io.ReadInt32(); GenderId = io.ReadInt32(); RaceId = io.ReadInt32(); var x = io.ReadInt16(); CharacterName = io.ReadString(x); VoiceVariationID = io.ReadInt32(); DifficultyModeID = io.ReadInt32(); if (Version > 9) { LowestDifficultyModeID = io.ReadInt32(); } CharacterSubclassID = io.ReadInt32(); if (Version >= 8) { CharacterID = new byte[0x10]; io.Read(CharacterID, 0, 0x10); } if (Version >= 0xD) { AgeInRealTimeSeconds = io.ReadSingle(); } return(this); }
public PlotFlagValueMap Read(DAIIO io) { xLength = io.ReadBit2(LengthBits); Version = io.ReadInt16(); if ((Version & 0xFFFF) >= 2) { MarkerDataLength = io.ReadInt16(); MarkerData = io.ReadString(MarkerDataLength); } if ((Version & 0xFFFF) >= 1) { BooleanFlagsThatAreTrue = new BooleanFlags(); BooleanFlagsThatAreTrue.Read(io); BooleanFlagsThatAreFalse = new BooleanFlags(); BooleanFlagsThatAreFalse.Read(io); IntegerFlagsCount = io.ReadInt16(); IntegerFlags = new ValueFlag[IntegerFlagsCount]; for (int i = 0; i < IntegerFlagsCount; i++) { IntegerFlags[i] = new ValueFlag(); IntegerFlags[i].Read(io); } FloatFlagsCount = io.ReadInt16(); FloatFlags = new ValueFlag[FloatFlagsCount]; for (int i = 0; i < FloatFlagsCount; i++) { FloatFlags[i] = new ValueFlag(); FloatFlags[i].Read(io); } } return(this); }
public BoneOffsetEntryV1 Read(DAIIO io) { xLength = io.ReadBit2(LengthBits); int count = io.ReadBit(0x10); BoneName = io.ReadString(count); Value = new byte[0xC]; for (int j = 0; j < 0xC; j++) { Value[j] = (byte)io.ReadBit(0x8); } return(this); }
public SubLevelInfo Read(DAIIO io) { XLength = io.ReadBit2(LengthBits); var count = (ushort)io.ReadBit2(0x10); Name = io.ReadString(count); BundleHash = io.ReadBit2(0x20); ParentBundleHash = io.ReadBit2(0x20); HeapType = io.ReadBit2(0x8); InitSize = io.ReadBit2(0x20); AllowGrow = io.ReadBoolean(); Status = io.ReadBit2(0x8); BundleType = io.ReadBit2(0x8); GroupID = io.ReadBit2(0x20); return(this); }
public ItemStatInstance Read(DAIIO io) { if (_info.Version > 1) { HasDynamicStats = io.ReadBoolean(); if (HasDynamicStats) { DynamicStats = new ItemDynamicStats().Read(io); } else if (_info.Version > 3) { DynamicStats = new ItemDynamicStats().Read(io); } } else if (_iscrafted) { CraftedStatIntances = new CraftedStatIntances().Read(io); } if (_info.Version > 9) { ItemAbilities = new ItemAbilities().Read(io); } if (_info.Version < 3) { ItemTimelines = new ItemTimelines().Read(io); } ItemMaterials = new ItemMaterials().Read(io); if (_info.Version < 5) { CompositionDisplay = new CompositionDisplay().Read(io); } else { short count = io.ReadInt16(); DisplayString = io.ReadString(count); } Level = io.ReadInt32(); DamageType = io.ReadInt32(); Quality = io.ReadInt32(); return(this); }
public StateHistory Read(DAIIO io) { xLength = io.ReadBit2(LengthBits); Name = ""; var xpos = io.Position; var count = (ushort)io.ReadBit(0x10); if (count == 0) { Unknown = io.ReadData(xLength - 0x10); } else { Name = io.ReadString(count); count = (ushort)io.ReadBit(0x10); var xl = io.Position - xpos; Hash = new byte[count]; if (count == 0) { Unknown = io.ReadData((int)(xLength - xl)); } else { io.Read(Hash, 0, count); } xl = io.Position - xpos; if (xl < xLength) { //var x1 = io.ReadBit2(0x18); var d = io.ReadData((int)(xLength - xl)); Console.WriteLine(BitConverter.ToString(d).Replace("-", "") + @" ==== > "); } } return(this); }
public SaveDataStructure Read(DAIIO io) { byte[] xdm = io.ReadBytes(0x41, false); if (!xdm.MemCompare(DataMagic, 0)) { throw new Exception("Invalid Save Data Header!"); } SavedTime = io.ReadInt64().ToUnixTime(); ushort count = io.ReadUInt16(); SID = io.ReadString(count); GameVersion = io.ReadUInt16(); SaveVersion = io.ReadUInt16(); ProjectVersion = io.ReadUInt16(); BitstreamFeatures = io.ReadUInt16(); ChangeList = io.ReadUInt32(); count = io.ReadUInt16(); Level = io.ReadString(count); Difficulty = io.ReadUInt32(); BundleCount = io.ReadUInt16(); BundleList = new string[BundleCount]; for (int i = 0; i < BundleCount; i++) { count = io.ReadUInt16(); BundleList[i] = io.ReadString(count); } InclusionCount = io.ReadUInt16(); Inclusions = new Inclusion[InclusionCount]; for (int i = 0; i < InclusionCount; i++) { Inclusions[i] = new Inclusion().Read(io); } SubLevelInfoCount = io.ReadBit2(0xc); if (SubLevelInfoCount <= 0x40 && SubLevelInfoCount > 0) { SubLevelEntries = new SubLevelInfo[SubLevelInfoCount]; for (int i = 0; i < SubLevelInfoCount; i++) { SubLevelEntries[i] = new SubLevelInfo().Read(io); } } LevelChecksum = new byte[0x10]; for (int i = 0; i < 0x10; i++) { LevelChecksum[i] = (byte)io.ReadBit(0x8); } DLC = io.ReadBit2(0x14); EntityVersion = (short)io.ReadBit2(0x10); ProjectVersionContext = (short)io.ReadBit2(0x10); HasDebugInfo = io.ReadBoolean(); AgentTocBookmark = io.ReadBit2(0x1A); ClientDataBookmark = io.ReadBit2(0x1A); EntityContentLength = io.ReadBit2(0x20); /////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////UNFINISHED SECTION!!!!!///////////////////////////////// var xpos = io.Position; //////// EntityContent = new EntityData(this).Read(io); //////// tmpdata = io.ReadData((int)(EntityContentLength - (io.Position - xpos))); //////// ////////////////////////////////////////////////////////////////////////////////// SaveEntityComplexLength = io.ReadBit2(6); SaveEntityComplex = io.ReadData((int)SaveEntityComplexLength); SaveEntityBookmark = io.ReadBit2(0x1A); SaveEntity = new SaveEntity(this).Read(io); EntityMetaData = new EntityMeta(this).Read(io); AgentToc = new AgentToc().Read(io); //var xdio = new DAIIO(io.xbaseStream, io.Position, ClientDataLength) {IsBigEndian = true}; ClientData = new ClientAgent().Read(io); //io.Position += ClientDataLength; LastPartSeedLength = (int)(io.Length - io.Position); if (LastPartSeedLength > 0) { LastPartSeed = io.ReadBit2((uint)LastPartSeedLength); } return(this); }