Пример #1
0
        /// <summary>
        /// Reads SceneSpecification from given MPQFileStream.
        /// </summary>
        /// <param name="stream">The MPQFileStream to read from.</param>
        public SceneSpecification(MpqFileStream stream)
        {
            CellZ = stream.ReadValueS32();
            Cell = new Vector2D(stream);
            SNOLevelAreas = new int[4];

            for (int i = 0; i < SNOLevelAreas.Length; i++)
            {
                SNOLevelAreas[i] = stream.ReadValueS32();
            }

            SNOPrevWorld = stream.ReadValueS32();
            Unknown1 = stream.ReadValueS32();
            SNOPrevLevelArea = stream.ReadValueS32();
            SNONextWorld = stream.ReadValueS32();
            Unknown2 = stream.ReadValueS32();
            SNONextLevelArea = stream.ReadValueS32();
            SNOMusic = stream.ReadValueS32();
            SNOCombatMusic = stream.ReadValueS32();
            SNOAmbient = stream.ReadValueS32();
            SNOReverb = stream.ReadValueS32();
            SNOWeather = stream.ReadValueS32();
            SNOPresetWorld = stream.ReadValueS32();
            Unknown3 = stream.ReadValueS32();
            Unknown4 = stream.ReadValueS32();
            Unknown5 = stream.ReadValueS32();
            stream.Position += (9 * 4);
            ClusterID = stream.ReadValueS32();
            SceneCachedValues = new SceneCachedValues(stream);
        }
Пример #2
0
 public void Read(MpqFileStream stream)
 {
     this.SNOSpawn = stream.ReadValueS32();
     this.Probability = stream.ReadValueS32();
     this.I1 = stream.ReadValueS32();
     this.I2 = stream.ReadValueS32();
 }
Пример #3
0
        public void Read(MpqFileStream stream)
        {
            this.SNOPower = stream.ReadValueS32();
            this.Category = (ActiveSkillCategory)stream.ReadValueS32();
            this.ReqLevel = stream.ReadValueS32();
            this.I2 = stream.ReadValueS32();

        }
Пример #4
0
 public ItemSpecifierData(MpqFileStream stream)
 {
     ItemGBId = stream.ReadValueS32();
     I0 = stream.ReadValueS32();
     for (int i = 0; i > 3; i++)
     {
         GBIdAffixes[i] = stream.ReadValueS32();
     }
     I1 = stream.ReadValueS32();
 }
Пример #5
0
 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);
 }
Пример #6
0
 public void Read(MpqFileStream stream)
 {
     this.SNOPower = stream.ReadValueS32();
     this.Category = (ActiveSkillCategory)stream.ReadValueS32();
     this.SkillGroup = stream.ReadValueS32();
     this.ReqLevel = stream.ReadValueS32();
     this.RuneNone_ReqLevel = stream.ReadValueS32();
     this.RuneA_ReqLevel = stream.ReadValueS32();
     this.RuneB_ReqLevel = stream.ReadValueS32();
     this.RuneC_ReqLevel = stream.ReadValueS32();
     this.RuneD_ReqLevel = stream.ReadValueS32();
     this.RuneE_ReqLevel = stream.ReadValueS32();
 }
Пример #7
0
 /// <summary>
 /// Reads SceneCachedValues from given MPQFileStream.
 /// </summary>
 /// <param name="stream">The MPQFileStream to read from.</param>
 public SceneCachedValues(MpqFileStream stream)
 {
     Unknown1 = stream.ReadValueS32();
     Unknown2 = stream.ReadValueS32();
     Unknown3 = stream.ReadValueS32();
     AABB1 = new AABB(stream);
     AABB2 = new AABB(stream);
     Unknown4 = new int[4];
     for (int i = 0; i < Unknown4.Length; i++)
     {
         Unknown4[i] = stream.ReadValueS32();
     }
     Unknown5 = stream.ReadValueS32();
 }
Пример #8
0
        public ScriptFormula(MpqFileStream stream)
        {
            this.I0 = stream.ReadValueS32();
            this.I1 = stream.ReadValueS32();
            this.I2 = stream.ReadValueS32();
            this.I3 = stream.ReadValueS32();
            this.I4 = stream.ReadValueS32();
            this.NameSize = stream.ReadValueS32();
            this.I5 = stream.ReadValueS32();
            this.OpcodeSize = stream.ReadValueS32();
            this.OpCodeName = stream.ReadStringZ(Encoding.ASCII);
 
            switch(NameSize % 4)
            {
                case 0:
                    break;
                case 1:
                    stream.Position += 3;
                    break;
                case 2:
                    stream.Position += 2;
                    break;
                case 3:
                    stream.Position += 1;
                    break;

            }
            this.OpCodeArray = new byte[OpcodeSize];
            stream.Read(OpCodeArray, 0, OpcodeSize);
        }
Пример #9
0
 public ConvLocalDisplayTimes(CrystalMpq.MpqFileStream stream)
 {
     for (int i = 0; i < Languages.Length; i++)
     {
         Languages[i] = stream.ReadValueS32();
     }
 }
Пример #10
0
 public void Read(MpqFileStream stream)
 {
     this.I0 = stream.ReadValueS32();
     // Maybe this should stay a Char Array instead of a string. - DarkLotus
     this.Name = stream.ReadString(64, true);
     this.TriggeredEvent.Read(stream);
 }
Пример #11
0
 public void Read(MpqFileStream stream)
 {
     this.I0 = stream.ReadValueS32();
     this.SNOSubTreasureClass = stream.ReadValueS32();
     this.Percentage = stream.ReadValueF32();
     this.I1 = stream.ReadValueS32();
     this.GBIdQualityClass = stream.ReadValueS32();
     this.I2 = stream.ReadValueS32();
     this.I3 = stream.ReadValueS32();
     this.SNOCondition = stream.ReadValueS32();
     this.ItemSpecifier = new ItemSpecifierData(stream);
     this.I5 = stream.ReadValueS32();
     this.I4 = new int[4];
     for (int i = 0; i < 4; i++)
         this.I4[i] = stream.ReadValueS32();
     this.I6 = stream.ReadValueS32();
 }
Пример #12
0
        public QuestUnassignedStep(MpqFileStream stream)
        {
            I0 = stream.ReadValueS32();
            stream.Position += 4;       // unaccounted in xml
            stream.Position += (2 * 4);
            StepObjectiveSets = stream.ReadSerializedData<QuestStepObjectiveSet>();

            stream.Position += (2 * 4);
            StepFailureConditionsSets = stream.ReadSerializedData<QuestStepFailureConditionSet>();
        }
Пример #13
0
        public void Read(MpqFileStream stream)
        {
            TagMapSize = stream.ReadValueS32();
            TagMapEntries = new TagMapEntry[TagMapSize];

            for (int i = 0; i < TagMapSize; i++)
            {
                TagMapEntries[i] = new TagMapEntry(stream);
            }
        }
Пример #14
0
 public Header(MpqFileStream stream)
 {
     this.DeadBeef = stream.ReadValueS32();
     this.SnoType = stream.ReadValueS32();
     this.Unknown1 = stream.ReadValueS32();
     this.Unknown2 = stream.ReadValueS32();
     this.SNOId = stream.ReadValueS32();
     this.Unknown3 = stream.ReadValueS32();
     this.Unknown4 = stream.ReadValueS32();
 }
Пример #15
0
 public WaypointInfo(MpqFileStream stream)
 {
     SNOWorld = stream.ReadValueS32();
     SNOLevelArea = stream.ReadValueS32();
     I0 = stream.ReadValueS32();
     I1 = stream.ReadValueS32();
     I2 = stream.ReadValueS32();
     SNOQuestRange = stream.ReadValueS32();
     I3 = stream.ReadValueS32();
 }
Пример #16
0
            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>(this.NavMeshSquareCount);

                stream.Position += (3 * 4);
                this.Filename = stream.ReadString(256, true);
            }
Пример #17
0
        public TagMapEntry(MpqFileStream stream)
        {
            this.Type = stream.ReadValueS32();
            this.TagID = stream.ReadValueS32();

            switch (this.Type)
            {
                case 0:
                    this.Int2 = stream.ReadValueS32();
                    break;
                case 1:
                    Float0 = stream.ReadValueF32();
                    break;
                case 2: // SNO
                    this.Int2 = stream.ReadValueS32();
                    break;
                case 4:
                    this.ScriptFormula = new ScriptFormula(stream);
                    break;
                default:
                    this.Int2 = stream.ReadValueS32();
                    break;
            }
        }
Пример #18
0
        public void Read(MpqFileStream stream)
        {
            this.Name = stream.ReadString(128, true);
            this.Int0 = stream.ReadValueS32();
            this.PRTransform = new PRTransform(stream);
            this.SNOName = new SNOName(stream);

            this.TagMap = stream.ReadSerializedItem<TagMap>();

            // Un sure about these 3 ints, 010template isnt the same as snodata.xml - DarkLotus
            this.IntTagMap = stream.ReadValueS32();
            Int1 = stream.ReadValueS32();
            Int2 = stream.ReadValueS32();

            var pointerMarkerLinks = stream.GetSerializedDataPointer();
            stream.Position += (3 * 4);
        }
Пример #19
0
        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);
        }
Пример #20
0
 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();
 }
Пример #21
0
 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();
 }
Пример #22
0
        public Environment(MpqFileStream stream)
        {
            Unknown = new int[38];
            for (int i = 0; i < 38; i++)
            {
                Unknown[i] = stream.ReadValueS32();
            }

            /* RGBAColor0 = new RGBAColor(stream);
             PostFXParams1 = new PostFXParams(stream);
             int2 = stream.ReadInt32();
             int3 = stream.ReadInt32();
             UberMaterial4 = new UberMaterial(stream);
             * */
            snoMusic = stream.ReadValueS32();
            snoCombatMusic = stream.ReadValueS32();
            snoAmbient = stream.ReadValueS32();
            snoReverb = stream.ReadValueS32();
            snoWeather = stream.ReadValueS32();
            snoIrradianceTex = stream.ReadValueS32();
            snoIrradianceTexDead = stream.ReadValueS32();
        }
Пример #23
0
        public LabelCondition(MpqFileStream stream)
        {
            Enum0 = (DT_ENUM0)stream.ReadValueS32();
            Int0 = stream.ReadValueS32();
            Int1 = new int[4];

            for (int i = 0; i < Int1.Length; i++)
            {
                Int1[i] = stream.ReadValueS32();
            }
        }
Пример #24
0
 public void Read(MpqFileStream stream)
 {
     this.GBIdLabel = stream.ReadValueS32();
     Int0 = stream.ReadValueS32();
     Float0 = stream.ReadValueF32();
     Int1 = stream.ReadValueS32();
     Int2 = stream.ReadValueS32();
 }
Пример #25
0
 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>();
 }
Пример #26
0
 public LabelRuleSet(MpqFileStream stream)
 {
     Rulecount = stream.ReadValueS32();
     stream.Position += (3 * 4);
     this.LabelRules = stream.ReadSerializedData<LabelRule>();
 }
Пример #27
0
 public void Read(MpqFileStream stream)
 {
     GBId = stream.ReadValueS32();
     I0 = stream.ReadValueS32();
 }
Пример #28
0
 public void Read(MpqFileStream stream)
 {
     this.SNOScene = stream.ReadValueS32();
     this.Probability = stream.ReadValueS32();
     stream.Position += (3 * 4);
     this.LabelCount = stream.ReadValueS32();
     this.Labels = stream.ReadSerializedData<SubSceneLabel>();
 }
Пример #29
0
 public void Read(MpqFileStream stream)
 {
     this.I0 = stream.ReadValueS32();
     this.SubSceneCount = stream.ReadValueS32();
     stream.Position += (2 * 4);
     this.Entries = stream.ReadSerializedData<SubSceneEntry>();
 }
Пример #30
0
        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);
        }
Пример #31
0
 public SceneClusterSet(MpqFileStream stream)
 {
     this.ClusterCount = stream.ReadValueS32();
     stream.Position += (4 * 3);
     this.SceneClusters = stream.ReadSerializedData<SceneCluster>();
 }