public static Dictionary<string, string> FromStream( System.IO.BinaryReader bw) { int count = bw.ReadInt32(); Dictionary<string, string> result = new Dictionary<string, string>(count); for (int i = 0; i < count;i++ ) { result.Add(bw.ReadPackString(), bw.ReadPackString()); } return result; }
public override int loadbody(System.IO.BinaryReader br) { long pos = br.BaseStream.Position; MeshName = br.ReadPackString(); TextureName = br.ReadPackString(); ShadowCaster = br.ReadBoolean();; ShadowReceiver = br.ReadBoolean(); Transparent = br.ReadBoolean(); SelfIlmn = br.ReadBoolean(); return Convert.ToInt32(br.BaseStream.Position - pos); }
public static AnimationGraph AnimationGraphFromStream(System.IO.BinaryReader br) { int[] indexes = new int[br.ReadInt32()]; for (int i = 0; i < indexes.Length; i++) indexes[i] = br.ReadInt32(); string description = br.ReadPackString(); AnimationGraph AGrf = new AnimationGraph(description, indexes); int lenth = br.ReadInt32(); AGrf.nodes = new AnimationNode[lenth]; for (int i = 0; i < lenth; i++) { AnimationNode node = AnimationNode.AnimationNodeFromStream(br); AGrf.nodes[i] = node; } for (int i = 0; i < AGrf.nodes.Length; i++) for (int j = 0; j < AGrf.nodes[i].nodeEvents.Length; j++) { AGrf.nodes[i].nodeEvents[j].associatedNode = AGrf.FindNodeWithName(AGrf.nodes[i].nodeEvents[j].associatedNodeName); AGrf.nodes[i].nodeEvents[j].parentNode = AGrf.FindNodeWithName(AGrf.nodes[i].nodeEvents[j].parentName); } return AGrf; }
public void FromStream(System.IO.BinaryReader br) { id = br.ReadUInt32(); group_id = br.ReadUInt32(); type = br.ReadUInt32(); descriptionName = br.ReadPackString(); objectMatrix = br.ReadMatrixFull(); }