public CustomTileInfo(MpqFileStream stream) { Int0 = stream.ReadValueS32(); Int1 = stream.ReadValueS32(); Int2 = stream.ReadValueS32(); V0 = new Vector2D(stream); CustomTileCells = stream.ReadSerializedData <CustomTileCell>(); stream.Position += (3 * 4); }
public void Read(MpqFileStream stream) { this.Name = stream.ReadString(128, true); LabelCondition = new LabelCondition(stream); Int0 = stream.ReadValueS32(); LabelCount = stream.ReadValueS32(); stream.Position += (2 * 4); this.Entries = stream.ReadSerializedData <LabelEntry>(); }
public ConversationList(MpqFile file) { MpqFileStream stream = file.Open(); this.Header = new Header(stream); stream.Position += (12); ConversationListEntries = stream.ReadSerializedData <ConversationListEntry>(); stream.Close(); }
public void Read(MpqFileStream stream) { this.F0 = new Float3(stream); this.F1 = new Float3(stream); this.F2 = new Float3(stream); stream.Position += 36; this.DominoNodeCount = stream.ReadValueS32(); this.VerticeCount = stream.ReadValueS32(); this.DominoTriangleCount = stream.ReadValueS32(); this.DominoEdgeCount = stream.ReadValueS32(); this.I4 = stream.ReadValueS32(); this.I5 = stream.ReadValueS32(); this.Vertices = stream.ReadSerializedData <Float3>(); this.DominoTriangles = stream.ReadSerializedData <MeshTriangle>(); this.DominoNodes = stream.ReadSerializedData <MeshNode>(); this.DominoEdges = stream.ReadSerializedData <MeshEdge>(); this.I6 = stream.ReadValueS32(); this.I7 = stream.ReadValueS32(); }
public void Read(MpqFileStream stream) { this.Name = stream.ReadString(128, true); this.ClusterId = stream.ReadValueS32(); this.GroupCount = stream.ReadValueS32(); stream.Position += (2 * 4); this.SubSceneGroups = stream.ReadSerializedData <SubSceneGroup>(); this.Default = new SubSceneGroup(stream); }
public void Read(MpqFileStream stream) { this.ActorGroups = new Dictionary <int, FileFormats.ActorGroup>(); foreach (var group in stream.ReadSerializedData <ActorGroup>()) //166 { this.ActorGroups.Add(group.UHash, group); } stream.Position += 8; this.ScriptGlobalVars = stream.ReadSerializedData <GlobalScriptVariable>(); stream.Position += 8; this.TuningParams = new DifficultyTuningParams[4]; for (int i = 0; i < 4; i++) { this.TuningParams[i] = new DifficultyTuningParams(stream); } this.F0 = stream.ReadValueF32(); this.F1 = stream.ReadValueF32(); this.F2 = stream.ReadValueF32(); this.F3 = stream.ReadValueF32(); this.F4 = stream.ReadValueF32(); this.I0 = stream.ReadValueS32(); this.I1 = stream.ReadValueS32(); this.F5 = stream.ReadValueF32(); this.F6 = stream.ReadValueF32(); this.F7 = stream.ReadValueF32(); this.F8 = stream.ReadValueF32(); this.I2 = stream.ReadValueS32(); this.I3 = stream.ReadValueS32(); this.I4 = stream.ReadValueS32(); this.F9 = stream.ReadValueF32(); this.F10 = stream.ReadValueF32(); this.F11 = stream.ReadValueF32(); this.F12 = stream.ReadValueF32(); this.F13 = stream.ReadValueF32(); this.F14 = stream.ReadValueF32(); this.F15 = stream.ReadValueF32(); this.F16 = stream.ReadValueF32(); this.F17 = stream.ReadValueF32(); this.F18 = stream.ReadValueF32(); this.F19 = stream.ReadValueF32(); stream.Position += 8; }
public void Read(MpqFileStream stream) { this.Name = stream.ReadString(128, true); this.Type = (MarkerType)stream.ReadValueS32(); this.PRTransform = new PRTransform(stream); this.SNOHandle = new SNOHandle(stream); this.TagMap = stream.ReadSerializedItem <TagMap>(); stream.Position += 8; this.MarkerLinksCount = stream.ReadValueS32(); this.MarkerLinks = stream.ReadSerializedData <MarkerLink>(); stream.Position += (3 * 4); }
public void Read(MpqFileStream stream) { this.GroupType = (SpawnGroupType)stream.ReadValueS32(); this.F0 = stream.ReadValueF32(); this.F1 = stream.ReadValueF32(); this.I0 = stream.ReadValueS32(); this.SpawnItemsCount = stream.ReadValueS32(); stream.Position += 12; this.SpawnItems = stream.ReadSerializedData <LevelAreaSpawnItem>(); this.I2 = stream.ReadValueS32(); this.I3 = stream.ReadValueS32(); }
public void Read(MpqFileStream stream) { this.Description = stream.ReadString(64, true); this.I0 = stream.ReadValueS32(); this.I1 = new int[4]; for (int i = 0; i < 4; i++) { this.I1[i] = stream.ReadValueS32(); } this.SpawnGroupsCount = stream.ReadValueS32(); stream.Position += 8; this.SpawnGroup = stream.ReadSerializedData <LevelAreaSpawnGroup>(); }
public void Read(MpqFileStream stream) { this.DRLGParams = stream.ReadSerializedData <DRLGParams>(); stream.Position += 8; this.SceneParams = stream.ReadSerializedItem <SceneParams>(); stream.Position += 8; LabelRuleSet = new LabelRuleSet(stream); this.Int1 = stream.ReadValueS32(); this.SceneClusterSet = new SceneClusterSet(stream); for (int i = 0; i < SNONavMeshFunctions.Length; i++) { SNONavMeshFunctions[i] = stream.ReadValueS32(); } SNOScript = stream.ReadValueS32(); Int2 = stream.ReadValueS32(); }
public void Read(MpqFileStream stream) { for (int i = 0; i < I0.Length; i++) { I0[i] = stream.ReadValueS32(); } I1 = stream.ReadValueS32(); I2 = stream.ReadValueS32(); I3 = stream.ReadValueS32(); I4 = stream.ReadValueS32(); I5 = stream.ReadValueS32(); stream.Position += 12; StepBonusObjectives = stream.ReadSerializedData <QuestStepObjective>(); }
public void Read(MpqFileStream stream) { this.I0 = stream.ReadValueS32(); this.AnimName = stream.ReadString(65, true); stream.Position += 3; this.Velocity = stream.ReadValueF32(); this.F0 = stream.ReadValueF32(); this.F1 = stream.ReadValueF32(); this.F2 = stream.ReadValueF32(); this.F3 = stream.ReadValueF32(); this.Time1 = stream.ReadValueS32(); this.Time2 = stream.ReadValueS32(); this.I1 = stream.ReadValueS32(); this.F4 = stream.ReadValueF32(); this.F5 = stream.ReadValueF32(); this.F6 = stream.ReadValueF32(); this.F7 = stream.ReadValueF32(); this.BoneNameCount = stream.ReadValueS32(); this.BoneNames = stream.ReadSerializedData <BoneName>(); stream.Position += 12; this.KeyframePosCount = stream.ReadValueS32(); this.TranslationCurves = stream.ReadSerializedData <TranslationCurve>(); stream.Position += 12; this.RotationCurves = stream.ReadSerializedData <RotationCurve>(); stream.Position += 8; this.ScaleCurves = stream.ReadSerializedData <ScaleCurve>(); stream.Position += 8; this.F8 = stream.ReadValueF32(); this.F9 = stream.ReadValueF32(); this.F10 = stream.ReadValueF32(); this.F11 = stream.ReadValueF32(); this.V0 = new Vector3D(stream); this.V1 = new Vector3D(stream); this.V2 = new Vector3D(stream); this.V3 = new Vector3D(stream); this.F12 = stream.ReadValueF32(); this.KeyedAttachments = stream.ReadSerializedData <KeyframedAttachment>(); this.KeyedAttachmentsCount = stream.ReadValueS32(); stream.Position += 8; this.KeyframePosList = stream.ReadSerializedData <Vector3D>(); stream.Position += 8; this.NonlinearOffset = stream.ReadSerializedData <Vector3D>(); stream.Position += 8; this.Velocity3D = new VelocityVector3D(stream); this.Link = new HardPointLink(stream); this.S0 = stream.ReadString(256, true); this.S1 = stream.ReadString(256, true); stream.Position += 8; }
public void Read(MpqFileStream stream) { this.Name = stream.ReadString(128, true); this.Type = (MarkerType)stream.ReadValueS32(); this.PRTransform = new PRTransform(stream); this.SNOHandle = new SNOHandle(stream); this.TagMap = stream.ReadSerializedItem <TagMap>(); // Un sure about these 3 ints, 010template isnt the same as snodata.xml - DarkLotus // IntTagMap && Int2 are always 0 for beta. leave it here only because xml does not match either -farmy this.IntTagMap = stream.ReadValueS32(); Int1 = stream.ReadValueS32(); var int2 = stream.ReadValueS32(); this.MarkerLinks = stream.ReadSerializedData <MarkerLink>(); stream.Position += (3 * 4); }
public NavMeshDef(MpqFileStream stream) { this.SquaresCountX = stream.ReadValueS32(); this.SquaresCountY = stream.ReadValueS32(); this.Int0 = stream.ReadValueS32(); this.NavMeshSquareCount = stream.ReadValueS32(); this.Float0 = stream.ReadValueF32(); this.Squares = stream.ReadSerializedData <NavMeshSquare>(); if (SquaresCountX <= 64 && SquaresCountY <= 64) { WalkGrid = new byte[64, 64]; } else if (SquaresCountX <= 128 && SquaresCountY <= 128) { WalkGrid = new byte[128, 128]; //96*96 } else if (SquaresCountX <= 256 && SquaresCountY <= 256) { WalkGrid = new byte[256, 256]; } else if (SquaresCountX <= 384 && SquaresCountY <= 384) { WalkGrid = new byte[384, 384]; } else if (SquaresCountX > 384 || SquaresCountY > 384) { WalkGrid = new byte[512, 512]; } // Loop thru each NavmeshSquare in the array, and fills the grid for (int i = 0; i < NavMeshSquareCount; i++) { WalkGrid[i % SquaresCountX, i / SquaresCountY] = (byte)(Squares[i].Flags & Scene.NavCellFlags.AllowWalk); // Set the grid to 0x1 if its walkable, left as 0 if not. - DarkLotus } stream.Position += (3 * 4); this.Filename = stream.ReadString(256, true); }
public Conversation(MpqFile file) { MpqFileStream stream = file.Open(); this.Header = new Header(stream); this.ConversationType = (ConversationTypes)stream.ReadValueS32(); this.I0 = stream.ReadValueS32(); this.I1 = stream.ReadValueS32(); this.SNOQuest = stream.ReadValueS32(); this.I2 = stream.ReadValueS32(); this.I3 = stream.ReadValueS32(); this.SNOConvPiggyback = stream.ReadValueS32(); this.SNOConvUnlock = stream.ReadValueS32(); this.I4 = stream.ReadValueS32(); this.Unknown = stream.ReadString(128, true); this.SNOPrimaryNpc = stream.ReadValueS32(); this.SNOAltNpc1 = stream.ReadValueS32(); this.SNOAltNpc2 = stream.ReadValueS32(); this.SNOAltNpc3 = stream.ReadValueS32(); this.SNOAltNpc4 = stream.ReadValueS32(); this.I5 = stream.ReadValueS32(); stream.Position += (2 * 4); RootTreeNodes = stream.ReadSerializedData <ConversationTreeNode>(); this.Unknown2 = stream.ReadString(256, true); this.I6 = stream.ReadValueS32(); stream.Position += (2 * 4); SerializableDataPointer compiledScriptPointer = stream.GetSerializedDataPointer(); stream.Position += 44; // these bytes are unaccounted for in the xml this.SNOBossEncounter = stream.ReadValueS32(); // reading compiled script, placed it here so i dont have to move the offset around CompiledScript = new byte[compiledScriptPointer.Size]; stream.Position = compiledScriptPointer.Offset + 16; stream.Read(CompiledScript, 0, compiledScriptPointer.Size); stream.Close(); }
/// <summary> /// Reads a total of n serialized items. /// </summary> /// <typeparam name="T">Item type to read.</typeparam> /// <param name="stream">The MPQFileStream to read from.</param> /// <param name="count">Number of items to read from.</param> /// <returns>List of items.</returns> public static List <T> ReadSerializedData <T>(this MpqFileStream stream, int count) where T : ISerializableData, new() { var pointer = stream.GetSerializedDataPointer(); return(stream.ReadSerializedData <T>(pointer, count)); }
public void Read(MpqFileStream stream) { stream.Position += 8; QuestStepFailureConditions = stream.ReadSerializedData <QuestStepFailureCondition>(); }
public void Read(MpqFileStream stream) { this.F0 = stream.ReadValueF32(); this.I1 = stream.ReadValueS32(); SpawnItems = stream.ReadSerializedData <MonsterMinionSpawnItem>(); }
public void Read(MpqFileStream stream) { this.I0 = stream.ReadValueS32(); this.Keys = stream.ReadSerializedData <ScaleKey>(); }
public LabelRuleSet(MpqFileStream stream) { Rulecount = stream.ReadValueS32(); stream.Position += (3 * 4); this.LabelRules = stream.ReadSerializedData <LabelRule>(); }
public void Read(MpqFileStream stream) { this.SceneChunks = stream.ReadSerializedData <SceneChunk>(); this.ChunkCount = stream.ReadValueS32(); stream.Position += (3 * 4); }
public SceneClusterSet(MpqFileStream stream) { this.ClusterCount = stream.ReadValueS32(); stream.Position += (4 * 3); this.SceneClusters = stream.ReadSerializedData <SceneCluster>(); }