Exemple #1
0
        public override void Read(BinaryReader file, uint size)
        {
            flags = file.ReadByte();

            if ((flags & 1) == 1)
            {
                x.Read(file, 4);
                y.Read(file, 4);
                z.Read(file, 4);
            }


            if ((flags & 2) == 2)
            {
                pitch.Read(file, 4);
                yaw.Read(file, 4);
                roll.Read(file, 4);
                w.Read(file, 4);
            }

            if ((flags & 4) == 4)
            {
                scale_x.Read(file, 4);
                scale_y.Read(file, 4);
                scale_z.Read(file, 4);
            }
        }
 public override void Read(BinaryReader file, uint size)
 {
     position.Read(file, size);
     Yaw.Read(file, size);
     Pitch.Read(file, size);
     Roll.Read(file, size);
 }
 public override void Read(BinaryReader file, uint size)
 {
     emitterDelay.Read(file, size);
     emitterDelayLow.Read(file, size);
     useEmitterDelayRange.Read(file, size);
     useEmitterDelayOnce.Read(file, size);
 }
Exemple #4
0
 public override void Read(BinaryReader file, uint size)
 {
     x.Read(file, size);
     y.Read(file, size);
     z.Read(file, size);
     w.Read(file, size);
 }
Exemple #5
0
 public override void Read(BinaryReader file, uint size)
 {
     positionX.Read(file, 0);
     positionY.Read(file, 0);
     positionZ.Read(file, 0);
     positionW.Read(file, 0);
     umbratile.Read(file, 0);
 }
Exemple #6
0
        public override void Read(BinaryReader file, uint size)
        {
            //base.Read(file, size);

            emitterDuration.Read(file, size);
            emitterDurationLow.Read(file, size);
            useEmitterDurationRange.Read(file, size);
        }
Exemple #7
0
        public override void Read(BinaryReader file, uint size)
        {
            base.Read(file, size);

            bytes1.Read(file, 20);
            float1.Read(file, 4);
            float2.Read(file, 4);
            bytes2.Read(file, 25);
        }
        public override void Read(BinaryReader file, uint size)
        {
            CDynamicInt count = new CDynamicInt(cr2w, null, "");
            count.Read(file, size);

            base.Read(file, size, count.val);

            padding.Read(file, 4);
        }
 public override void Read(BinaryReader file, uint size)
 {
     box0.Read(file, 4);
     box1.Read(file, 4);
     box2.Read(file, 4);
     box3.Read(file, 4);
     box4.Read(file, 4);
     box5.Read(file, 4);
     patchHash.Read(file, 8);
 }
 public override void Read(BinaryReader file, uint size)
 {
     type.Read(file, 1);
     flags.Read(file, 1);
     radius.Read(file, 2);
     offset.Read(file, 8);
     positionX.Read(file, 4);
     positionY.Read(file, 4);
     positionZ.Read(file, 4);
 }
Exemple #11
0
 public override void Read(BinaryReader file, uint size)
 {
     time.Read(file, size);
     value.Read(file, size);
     controlPoint1.Read(file, size);
     controlPoint2.Read(file, size);
     curveTypeL.Read(file, size);
     curveTypeR.Read(file, size);
     //unk3.Read(file, size);
     //unk4.Read(file, size);
 }
Exemple #12
0
 public override void Read(BinaryReader file, uint size)
 {
     lods.Read(file, size);
     emitters.Read(file, size);
     autoHideDistance.Read(file, size);
     autoHideRange.Read(file, size);
     previewBackgroundColor.Read(file, size);
     previewShowGrid.Read(file, size);
     visibleThroughWalls.Read(file, size);
     prewarmingTime.Read(file, size);
     renderingPlane.Read(file, size);
 }
Exemple #13
0
 public override void Read(BinaryReader file, uint size)
 {
     //TODO: Investigate what the first 10 bytes are
     base.Read(file, size);
     data.Bytes = file.ReadBytes((int)((file.BaseStream.Length - 32) - file.BaseStream.Position));
     cornerPosition.Read(file, size);
     dataSizeX.Read(file, size);
     dataSizeY.Read(file, size);
     dataSizeZ.Read(file, size);
     dataSize.Read(file, size);
     sizeInKbytes.Read(file, size);
 }
 public override void Read(BinaryReader file, uint size)
 {
     diffuseTexture.Read(file, size);
     normalTexture.Read(file, size);
     specularColor.Read(file, size);
     specularScale.Read(file, size);
     specularBase.Read(file, size);
     specularity.Read(file, size);
     additiveNormals.Read(file, size);
     diffuseRandomColor0.Read(file, size);
     diffuseRandomColor1.Read(file, size);
     subUVType.Read(file, size);
 }
Exemple #15
0
 public override void Read(BinaryReader file, uint size)
 {
     diffuseTexture.Read(file, size);
     normalTexture.Read(file, size);
     specularColor.Read(file, size); //BUG: fx\monsters\endriaga\spawn_ground\endriaga_spawn_ground.w2p
     //file.BaseStream.Seek(4, SeekOrigin.Current);
     specularScale.Read(file, size);
     specularBase.Read(file, size);
     specularity.Read(file, size);
     additiveNormals.Read(file, size);
     diffuseRandomColor0.Read(file, size);
     diffuseRandomColor1.Read(file, size);
     subUVType.Read(file, size);
 }
Exemple #16
0
        public override void Read(BinaryReader file, uint size)
        {
            CDynamicInt count = new CDynamicInt(cr2w);

            count.Read(file, size);

            for (int i = 0; i < count.val; i++)
            {
                T element = elementFactory.Invoke(cr2w);
                element.Name = i.ToString();
                element.Read(file, size);
                elements.Add(element);
            }

            padding.Read(file, 4);
        }
Exemple #17
0
 public override void Read(BinaryReader file, uint size)
 {
     material.Read(file, size);
     farZ.Read(file, size);
     nearZ.Read(file, size);
     ssize.Read(file, size);
     depthFadePower.Read(file, size);
     normalFadeBias.Read(file, size);
     normalFadeScale.Read(file, size);
     doubleSided.Read(file, size);
     projectionMode.Read(file, size);
     decalLifetime.Read(file, size);
     decalFadeTime.Read(file, size);
     decalFadeInTime.Read(file, size);
     projectOnlyOnStatic.Read(file, size);
     startScale.Read(file, size);
     scaleTime.Read(file, size);
     useVerticalProjection.Read(file, size);
     spawnPriority.Read(file, size);
     autoHideDistance.Read(file, size);
     spawnFrequency.Read(file, size);
 }
        public override void Read(BinaryReader file, uint size)
        {
            box0.Read(file, 4);
            box1.Read(file, 4);
            box2.Read(file, 4);
            box3.Read(file, 4);
            box4.Read(file, 4);
            box5.Read(file, 4);
            UInt64 hashint = file.ReadUInt64();

            // here for now until maincontroller is in Wkit.Common
            if (hashint == 0)
            {
                pathHash.val = "";
            }
            else
            {
                // check for vanilla hashed paths
                if (Cr2wResourceManager.Get().HashdumpDict.ContainsValue(hashint))
                {
                    pathHash.val = Cr2wResourceManager.Get().HashdumpDict.First(_ => _.Value == hashint).Key;
                }
                else
                {
                    // check for custom hashed paths
                    if (Cr2wResourceManager.Get().CHashdumpDict.ContainsValue(hashint))
                    {
                        pathHash.val = Cr2wResourceManager.Get().CHashdumpDict.First(_ => _.Value == hashint).Key;
                    }
                    else
                    {
                        pathHash.val = $"#{hashint}";
                    }
                }
            }
        }
Exemple #19
0
 public override void Read(BinaryReader file, uint size)
 {
     index.Read(file, 4);
     blendvalue.Read(file, 4);
 }
 public override void Read(BinaryReader file, uint size)
 {
     distance.Read(file, size);
 }
Exemple #21
0
        public override void Read(BinaryReader file, uint size)
        {
            base.Read(file, size);

            var cnt = file.ReadVLQInt32();

            for (int i = 0; i < cnt; i++)
            {
                //This is actually a byte-byte pair but no idea why or how anyone would edit this
                var mapping = new CUInt16(cr2w, Unicodemapping, "");
                mapping.Read(file, size);
                Unicodemapping.AddVariable(mapping);
            }
            Linedist.Read(file, size);
            Maxglyphheight.Read(file, size);
            Kerning.Read(file, size);

            var num = file.ReadVLQInt32();

            for (int i = 0; i < num; i++)
            {
                var glyph = new CArray <CFloat>(cr2w, Glyphs, "Glyph - " + i)
                {
                    Elementtype = "Float"
                };
                // UVs
                CFloat uv00 = new CFloat(cr2w, glyph, "UV[0][0]");
                uv00.Read(file, size);
                glyph.AddVariable(uv00);
                CFloat uv01 = new CFloat(cr2w, glyph, "UV[0][1]");
                uv01.Read(file, size);
                glyph.AddVariable(uv01);
                CFloat uv10 = new CFloat(cr2w, glyph, "UV[1][0]");
                uv10.Read(file, size);
                glyph.AddVariable(uv10);
                CFloat uv11 = new CFloat(cr2w, glyph, "UV[1][1]");
                uv11.Read(file, size);
                glyph.AddVariable(uv11);

                CInt32 textureindex = new CInt32(cr2w, glyph, "Texture index");
                textureindex.Read(file, size);
                glyph.AddVariable(textureindex);
                CInt32 width = new CInt32(cr2w, glyph, "Width");
                width.Read(file, size);
                glyph.AddVariable(width);
                CInt32 height = new CInt32(cr2w, glyph, "Height");
                height.Read(file, size);
                glyph.AddVariable(height);
                CInt32 advance_x = new CInt32(cr2w, glyph, "Advance X");
                advance_x.Read(file, size);
                glyph.AddVariable(advance_x);
                CInt32 bearing_x = new CInt32(cr2w, glyph, "Bearing X");
                bearing_x.Read(file, size);
                glyph.AddVariable(bearing_x);
                CInt32 bearing_y = new CInt32(cr2w, glyph, "Bearing Y");
                bearing_y.Read(file, size);
                glyph.AddVariable(bearing_y);

                Glyphs.AddVariable(glyph);
            }
        }