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) { 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); } }