private void loadFromStream(Stream input) { this.magic1 = StreamHelpers.ReadValueU64(input); this.magic2 = StreamHelpers.ReadValueU64(input); this.headerSize = StreamHelpers.ReadValueU32(input); this.blank_1 = StreamHelpers.ReadValueU32(input); // Blank this.blank_2 = StreamHelpers.ReadValueU32(input); // Blank this.blank_3 = StreamHelpers.ReadValueU32(input); // Blank this.version = StreamHelpers.ReadValueU32(input); this.dataSize = StreamHelpers.ReadValueU32(input); this.crc32 = StreamHelpers.ReadValueU32(input); this.unknown3 = StreamHelpers.ReadValueU32(input); for (int i = 0; i < 10; i++) { this.unkList.Add(StreamHelpers.ReadValueU32(input)); } this.unknown4 = StreamHelpers.ReadValueU32(input); // Always 2? this.scriptOffset = StreamHelpers.ReadValueU32(input); this.scriptSize = StreamHelpers.ReadValueU32(input); // 4 more values... add to unkList for (int i = 0; i < 4; i++) { this.unkList.Add(StreamHelpers.ReadValueU32(input)); } this.int1Offset = StreamHelpers.ReadValueU32(input); this.int1Count = StreamHelpers.ReadValueU32(input); this.int1EndOffset = StreamHelpers.ReadValueU32(input); // Knock one off int1Count this.int1Count--; this.unknown5 = StreamHelpers.ReadValueU32(input); // Int 1 seems to start with 1 based, not 0? // Always 4 then 0 this.int1unk1 = StreamHelpers.ReadValueU32(input); this.int1unk2 = StreamHelpers.ReadValueU32(input); for (int i = 0; i < this.int1Count; i++) { RIGChunkInt1 rChunk = new RIGChunkInt1(); rChunk.unk1 = StreamHelpers.ReadValueU32(input); rChunk.unk2 = StreamHelpers.ReadValueU64(input); this.int1.Add(rChunk); } // Extra value this.unknown6 = StreamHelpers.ReadValueU32(input); }
private void loadFromStream(Stream input) { this.count1 = StreamHelpers.ReadValueU32(input); for (int i = 0; i < count1; i++) { Entry e = new Entry(this.typeId); e.Load(input); this.entries.Add(e); } }
private void loadFromStream(Stream input) { this.version = StreamHelpers.ReadValueU32(input); uint count = StreamHelpers.ReadValueU32(input); for (int i = 0; i < count; i++) { ulong instanceId = StreamHelpers.ReadValueU64(input); uint nameLength = StreamHelpers.ReadValueU32(input); string nameMap = StreamHelpers.ReadStringASCII(input, nameLength); this.entries.Add(instanceId, nameMap); } }
private void loadFromStream(Stream input) { BinaryReader reader = new BinaryReader(input); this.version = StreamHelpers.ReadValueU32(input); this.offSize.Load(input); this.materialList = new CatalogResource.MaterialList(); this.materialList.typeId = 0x319E4F1D; this.materialList.Load(input); if (this.version >= 0x16) { reader.ReadString(); } this.common.Load(input); this.unkDword1 = StreamHelpers.ReadValueU32(input); this.unkByte = StreamHelpers.ReadValueU8(input); this.unkDword2 = StreamHelpers.ReadValueU32(input); this.unkByte2 = StreamHelpers.ReadValueU8(input); this.unkByte3 = StreamHelpers.ReadValueU8(input); this.unk4Byte = StreamHelpers.ReadValueU32(input); this.index1 = StreamHelpers.ReadValueU32(input); this.unkDword3 = StreamHelpers.ReadValueU32(input); this.unkDword4 = StreamHelpers.ReadValueU32(input); this.unkDword5 = StreamHelpers.ReadValueU32(input); this.unkDword6 = StreamHelpers.ReadValueU32(input); this.unkDword7 = StreamHelpers.ReadValueU32(input); this.count1 = StreamHelpers.ReadValueU8(input); for (int i = 0; i < count1; i++) { WallMask wm = new WallMask(); wm = StreamHelpers.ReadStructure <WallMask>(input); this.wallMasks.Add(wm); } this.unkByte = StreamHelpers.ReadValueU8(input); this.index2 = StreamHelpers.ReadValueU32(input); this.hash = StreamHelpers.ReadValueU32(input); this.roomFlags = StreamHelpers.ReadValueU32(input); this.functionCategoryFlags = StreamHelpers.ReadValueU32(input); this.subCategoryFlags = StreamHelpers.ReadValueU64(input); this.subRoomFlags = StreamHelpers.ReadValueU64(input); this.buildCategoryFlags = StreamHelpers.ReadValueU32(input); this.index3 = StreamHelpers.ReadValueU32(input); this.unkDword = StreamHelpers.ReadValueU32(input); this.materialGroup1 = MadScience.Helpers.stripControlFromString(reader.ReadString()); this.materialGroup2 = MadScience.Helpers.stripControlFromString(reader.ReadString()); }
private void loadFromStream(Stream input) { this.entryType = StreamHelpers.ReadValueU8(input); if (this.entryType != 1) { this.unkDword = StreamHelpers.ReadValueU32(input); } this.offset = StreamHelpers.ReadValueU32(input); //this.unkInt = StreamHelpers.ReadValueU16(input); //this.offSize.Load(input); // Skip the materialBlock for now //this.materialBlock.Load(input); input.Seek(this.offset, SeekOrigin.Current); this.unkDword2 = StreamHelpers.ReadValueU32(input); if (this.typeId == 0x515CA4CD) { this.wallDword1 = StreamHelpers.ReadValueU32(input); this.wallDword2 = StreamHelpers.ReadValueU32(input); this.wallDword3 = StreamHelpers.ReadValueU32(input); } }
private void loadFromStream(Stream input) { this.magic = StreamHelpers.ReadStringASCII(input, 4); this.version = StreamHelpers.ReadValueU32(input); uint count1 = StreamHelpers.ReadValueU32(input); uint count2 = StreamHelpers.ReadValueU32(input); uint count3 = StreamHelpers.ReadValueU32(input); uint count4 = StreamHelpers.ReadValueU32(input); this.count5 = StreamHelpers.ReadValueU32(input); // Routes for (int i = 0; i < count1; i++) { this.Routes.Add(new RSLTEntry()); this.Routes[i].slotName = StreamHelpers.ReadValueU32(input); } for (int i = 0; i < count1; i++) { this.Routes[i].boneName = StreamHelpers.ReadValueU32(input); } for (int i = 0; i < count1; i++) { this.Routes[i].matrix = new Matrix4by3(input); } if (count1 > 0) { StreamHelpers.ReadValueU32(input); } // Containers for (int i = 0; i < count2; i++) { this.Containers.Add(new RSLTEntry()); this.Containers[i].slotName = StreamHelpers.ReadValueU32(input); } for (int i = 0; i < count2; i++) { this.Containers[i].boneName = StreamHelpers.ReadValueU32(input); } for (int i = 0; i < count2; i++) { this.Containers[i].flags = StreamHelpers.ReadValueU32(input); } for (int i = 0; i < count2; i++) { this.Containers[i].matrix = new Matrix4by3(input); } if (count2 > 0) { StreamHelpers.ReadValueU32(input); } // Effects for (int i = 0; i < count3; i++) { this.Effects.Add(new RSLTEntry()); this.Effects[i].slotName = StreamHelpers.ReadValueU32(input); } for (int i = 0; i < count3; i++) { this.Effects[i].boneName = StreamHelpers.ReadValueU32(input); } for (int i = 0; i < count3; i++) { this.Effects[i].matrix = new Matrix4by3(input); } if (count3 > 0) { StreamHelpers.ReadValueU32(input); } // IK Targets for (int i = 0; i < count4; i++) { this.IKTargets.Add(new RSLTEntry()); this.IKTargets[i].slotName = StreamHelpers.ReadValueU32(input); } for (int i = 0; i < count4; i++) { this.IKTargets[i].boneName = StreamHelpers.ReadValueU32(input); } for (int i = 0; i < count4; i++) { this.IKTargets[i].matrix = new Matrix4by3(input); } if (count4 > 0) { StreamHelpers.ReadValueU32(input); } }
private void loadFromStream(Stream input) { this.dataType = StreamHelpers.ReadValueU32(input); this.subType = StreamHelpers.ReadValueU32(input); this.bytesPerElement = StreamHelpers.ReadValueU8(input); }