public CSectorDataResource(CR2WFile cr2w)
     : base(cr2w)
 {
     box0 = new CFloat(cr2w)
     {
         Name = "box0", Type = "Float"
     };
     box1 = new CFloat(cr2w)
     {
         Name = "box1", Type = "Float"
     };
     box2 = new CFloat(cr2w)
     {
         Name = "box2", Type = "Float"
     };
     box3 = new CFloat(cr2w)
     {
         Name = "box3", Type = "Float"
     };
     box4 = new CFloat(cr2w)
     {
         Name = "box4", Type = "Float"
     };
     box5 = new CFloat(cr2w)
     {
         Name = "box5", Type = "Float"
     };
     patchHash = new CUInt64(cr2w)
     {
         Name = "patchHash", Type = "UInt64"
     };
 }
Exemple #2
0
        //public CUInt16 unk3;
        //public CUInt16 unk4;


        public SCurveData(CR2WFile cr2w) : base(cr2w)
        {
            time = new CFloat(cr2w)
            {
                Name = "x"
            };
            value = new CFloat(cr2w)
            {
                Name = "y"
            };
            controlPoint1 = new CQuaternion(cr2w)
            {
                Name = "controlPoint1"
            };
            controlPoint2 = new CQuaternion(cr2w)
            {
                Name = "controlPoint2"
            };
            curveTypeL = new CUInt32(cr2w)
            {
                Name = "curveTypeL"
            };
            curveTypeR = new CUInt32(cr2w)
            {
                Name = "curveTypeR"
            };
            //unk3 = new CUInt16(cr2w) { Name = "curveTypeL" };
            //unk4 = new CUInt16(cr2w) { Name = "curveTypeR" };
        }
 public CSectorDataResource(CR2WFile cr2w, CVariable parent, string name) : base(cr2w, parent, name)
 {
     box0 = new CFloat(cr2w, this, nameof(box0))
     {
         IsSerialized = true
     };
     box1 = new CFloat(cr2w, this, nameof(box1))
     {
         IsSerialized = true
     };
     box2 = new CFloat(cr2w, this, nameof(box2))
     {
         IsSerialized = true
     };
     box3 = new CFloat(cr2w, this, nameof(box3))
     {
         IsSerialized = true
     };
     box4 = new CFloat(cr2w, this, nameof(box4))
     {
         IsSerialized = true
     };
     box5 = new CFloat(cr2w, this, nameof(box5))
     {
         IsSerialized = true
     };
     pathHash = new CString(cr2w, this, nameof(pathHash))
     {
         IsSerialized = true
     };
 }
 public SParticleEmitterLODLevel(CR2WFile cr2w) : base(cr2w)
 {
     distance = new CFloat(cr2w)
     {
         Name = "distance"
     };
 }
 public CSectorDataObject(CR2WFile cr2w)
     : base(cr2w)
 {
     type = new CUInt8(cr2w)
     {
         Name = "type", Type = "UInt8"
     };
     flags = new CUInt8(cr2w)
     {
         Name = "flags", Type = "UInt8"
     };
     radius = new CUInt16(cr2w)
     {
         Name = "radius", Type = "UInt16"
     };
     offset = new CUInt64(cr2w)
     {
         Name = "offset", Type = "UInt64"
     };
     positionX = new CFloat(cr2w)
     {
         Name = "positionX", Type = "Float"
     };
     positionY = new CFloat(cr2w)
     {
         Name = "positionY", Type = "Float"
     };
     positionZ = new CFloat(cr2w)
     {
         Name = "positionZ", Type = "Float"
     };
 }
Exemple #6
0
 public CSwarmCellMap(CR2WFile cr2w) : base(cr2w)
 {
     data = new CByteArray(cr2w)
     {
         Name = "Data"
     };
     cornerPosition = new CVector3D(cr2w)
     {
         Name = "Corner position"
     };
     dataSizeX = new CInt32(cr2w)
     {
         Name = "Data size X"
     };
     dataSizeY = new CInt32(cr2w)
     {
         Name = "Data size Y"
     };
     dataSizeZ = new CInt32(cr2w)
     {
         Name = "Data size Z"
     };
     dataSize = new CInt32(cr2w)
     {
         Name = "Data size in bits"
     };
     sizeInKbytes = new CFloat(cr2w)
     {
         Name = "Data size in Kilobytes"
     };
 }
Exemple #7
0
 public CPaddedBuffer(CR2WFile cr2w, Func <CR2WFile, T> elementFactory) : base(cr2w)
 {
     this.elementFactory = elementFactory;
     padding             = new CFloat(cr2w)
     {
         Name = "padding"
     };
 }
Exemple #8
0
        public override CVariable SetValue(object val)
        {
            if (val is SVector2D v)
            {
                this.x = v.x;
                this.y = v.y;
            }

            return(this);
        }
Exemple #9
0
        public override CVariable SetValue(object val)
        {
            if (val is SVector3D v)
            {
                this.X = v.X;
                this.Y = v.Y;
                this.Z = v.Z;
            }

            return(this);
        }
Exemple #10
0
 public CVector2D(CR2WFile cr2w = null)
     : base(cr2w)
 {
     x = new CFloat(null)
     {
         Name = "x", Type = "Float"
     };
     y = new CFloat(null)
     {
         Name = "y", Type = "Float"
     };
 }
Exemple #11
0
 public EngineTransform(CR2WFile cr2w, CVariable parent, string name) : base(cr2w, parent, name)
 {
     X       = new CFloat(cr2w, this, nameof(X));
     Y       = new CFloat(cr2w, this, nameof(Y));
     Z       = new CFloat(cr2w, this, nameof(Z));
     Pitch   = new CFloat(cr2w, this, nameof(Pitch));
     Yaw     = new CFloat(cr2w, this, nameof(Yaw));
     Roll    = new CFloat(cr2w, this, nameof(Roll));
     Scale_x = new CFloat(cr2w, this, nameof(Scale_x));
     Scale_y = new CFloat(cr2w, this, nameof(Scale_y));
     Scale_z = new CFloat(cr2w, this, nameof(Scale_z));
 }
Exemple #12
0
 public ShBlendMultipleNodeData(CR2WFile cr2w) :
     base(cr2w)
 {
     index = new CUInt32(cr2w)
     {
         Name = "index"
     };
     blendvalue = new CFloat(cr2w)
     {
         Name = "blendvalue"
     };
 }
 public SFoliageInstance(CR2WFile cr2w) : base(cr2w)
 {
     position = new CVector3D(cr2w)
     {
         Name = "Position"
     };
     Yaw        = new CFloat(cr2w);
     Yaw.Name   = "Yaw";
     Pitch      = new CFloat(cr2w);
     Pitch.Name = "Pitch";
     Roll       = new CFloat(cr2w);
     Roll.Name  = "Roll";
 }
Exemple #14
0
 public SVector3D(CR2WFile cr2w, CVariable parent, string name) : base(cr2w, parent, name)
 {
     X = new CFloat(cr2w, this, nameof(X))
     {
         IsSerialized = true
     };
     Y = new CFloat(cr2w, this, nameof(Y))
     {
         IsSerialized = true
     };
     Z = new CFloat(cr2w, this, nameof(Z))
     {
         IsSerialized = true
     };
 }
Exemple #15
0
 public EmitterDurationSettings(CR2WFile cr2w) : base(cr2w)
 {
     emitterDuration = new CFloat(cr2w)
     {
         Name = "emitterDuration", Type = "Float"
     };
     emitterDurationLow = new CFloat(cr2w)
     {
         Name = "emitterDurationLow", Type = "Float"
     };
     useEmitterDurationRange = new CBool(cr2w)
     {
         Name = "useEmitterDurationRange", Type = "Bool"
     };
 }
Exemple #16
0
 public CUmbraScene(CR2WFile cr2w) :
     base(cr2w)
 {
     unk1 = new CUInt32(cr2w)
     {
         Name = nameof(unk1)
     };
     unk2 = new CFloat(cr2w)
     {
         Name = nameof(unk2)
     };
     tiles = new CBufferUInt32 <SUmbraSceneData>(cr2w, _ => new SUmbraSceneData(_))
     {
         Name = nameof(tiles)
     };
 }
Exemple #17
0
        public CEngineQsTransform(CR2WFile cr2w)
            : base(cr2w)
        {
            x = new CFloat(null)
            {
                Name = "x", Type = "Float"
            };
            y = new CFloat(null)
            {
                Name = "y", Type = "Float"
            };
            z = new CFloat(null)
            {
                Name = "z", Type = "Float"
            };
            pitch = new CFloat(null)
            {
                Name = "rotation x", Type = "Float"
            };
            yaw = new CFloat(null)
            {
                Name = "rotation y", Type = "Float"
            };
            roll = new CFloat(null)
            {
                Name = "rotation z", Type = "Float"
            };
            w = new CFloat(null)
            {
                Name = "rotation w", Type = "Float"
            };
            scale_x = new CFloat(null)
            {
                Name = "scale x", Type = "Float"
            };
            scale_y = new CFloat(null)
            {
                Name = "scale y", Type = "Float"
            };
            scale_z = new CFloat(null)
            {
                Name = "scale z", Type = "Float"
            };

            w.val = 1;
        }
Exemple #18
0
            public CurvePiece(CR2WFile cr2w) : base(cr2w)
            {
                // This has a fixed size in memory, but for some reason file format is allowed to not provide all,
                // leaving the rest to zero values. Possibly has individual fields instead of an array.
                values     = new CFloat[16];
                valueCount = new CUInt16(cr2w)
                {
                    Name = "count", Type = "CUInt16", val = (ushort)values.Length
                };

                for (var i = 0; i < values.Length; i++)
                {
                    values[i] = new CFloat(cr2w)
                    {
                        Name = i.ToString(), Type = "Float"
                    };
                }
            }
Exemple #19
0
 public SDynamicDecalMaterialInfo(CR2WFile cr2w) : base(cr2w)
 {
     diffuseTexture = new CHandle(cr2w)
     {
         Name = "diffuseTexture", Type = "CHandle"
     };
     normalTexture = new CHandle(cr2w)
     {
         Name = "normalTexture", Type = "CHandle"
     };
     specularColor = new CColor(cr2w)
     {
         Name = "specularColor", Type = "Color"
     };
     specularScale = new CFloat(cr2w)
     {
         Name = "specularScale", Type = "Float"
     };
     specularBase = new CFloat(cr2w)
     {
         Name = "specularBase", Type = "Float"
     };
     specularity = new CFloat(cr2w)
     {
         Name = "specularity", Type = "Float"
     };
     additiveNormals = new CBool(cr2w)
     {
         Name = "additiveNormals", Type = "Bool"
     };
     diffuseRandomColor0 = new CColor(cr2w)
     {
         Name = "diffuseRandomColor0", Type = "Color"
     };
     diffuseRandomColor1 = new CColor(cr2w)
     {
         Name = "diffuseRandomColor1", Type = "Color"
     };
     subUVType = new CName(cr2w)
     {
         Name = "subUVType", Type = "CName"
     };
 }
 public EmitterDelaySettings(CR2WFile cr2w) : base(cr2w)
 {
     emitterDelay = new CFloat(cr2w)
     {
         Name = "emitterDelay", Type = "CFloat"
     };
     emitterDelayLow = new CFloat(cr2w)
     {
         Name = "emitterDelayLow", Type = "CFloat"
     };
     useEmitterDelayRange = new CBool(cr2w)
     {
         Name = "useEmitterDelayRange", Type = "CBool"
     };
     useEmitterDelayOnce = new CBool(cr2w)
     {
         Name = "useEmitterDelayOnce", Type = "CBool"
     };
 }
Exemple #21
0
 public CQuaternion(CR2WFile cr2w = null)
     : base(cr2w)
 {
     x = new CFloat(null)
     {
         Name = "x", Type = "Float"
     };
     y = new CFloat(null)
     {
         Name = "y", Type = "Float"
     };
     z = new CFloat(null)
     {
         Name = "z", Type = "Float"
     };
     w = new CFloat(null)
     {
         Name = "w", Type = "Float"
     };
 }
Exemple #22
0
 public CCameraCompressedPose(CR2WFile cr2w)
     : base(cr2w)
 {
     bytes1 = new CBytes(cr2w)
     {
         Name = nameof(bytes1)
     };
     float1 = new CFloat(cr2w)
     {
         Name = nameof(float1)
     };
     float2 = new CFloat(cr2w)
     {
         Name = nameof(float2)
     };
     bytes2 = new CBytes(cr2w)
     {
         Name = nameof(bytes2)
     };
 }
 public CEngineTransform(CR2WFile cr2w)
     : base(cr2w)
 {
     x = new CFloat(null)
     {
         Name = "x", Type = "Float"
     };
     y = new CFloat(null)
     {
         Name = "y", Type = "Float"
     };
     z = new CFloat(null)
     {
         Name = "z", Type = "Float"
     };
     pitch = new CFloat(null)
     {
         Name = "pitch", Type = "Float"
     };
     yaw = new CFloat(null)
     {
         Name = "yaw", Type = "Float"
     };
     roll = new CFloat(null)
     {
         Name = "roll", Type = "Float"
     };
     scale_x = new CFloat(null)
     {
         Name = "scale x", Type = "Float"
     };
     scale_y = new CFloat(null)
     {
         Name = "scale y", Type = "Float"
     };
     scale_z = new CFloat(null)
     {
         Name = "scale z", Type = "Float"
     };
 }
Exemple #24
0
 public CParticleSystem(CR2WFile cr2w) : base(cr2w)
 {
     lods = new CArray("array:0,0,SParticleSystemLODLevel", "SParticleSystemLODLevel", true, cr2w)
     {
         Name = "lods", Type = "CArray"
     };
     emitters = new CArray("array:0,0,ptr:CParticleEmitter", "CParticleEmitter", true, cr2w)
     {
         Name = "emitters", Type = "CArray"
     };
     autoHideDistance = new CFloat(cr2w)
     {
         Name = "autoHideDistance", Type = "CFloat"
     };
     autoHideRange = new CFloat(cr2w)
     {
         Name = "autoHideRange", Type = "CFloat"
     };
     previewBackgroundColor = new CColor(cr2w)
     {
         Name = "previewBackgroundColor", Type = "Color"
     };
     previewShowGrid = new CBool(cr2w)
     {
         Name = "previewShowGrid", Type = "CBool"
     };
     visibleThroughWalls = new CBool(cr2w)
     {
         Name = "visibleThroughWalls", Type = "CBool"
     };
     prewarmingTime = new CFloat(cr2w)
     {
         Name = "prewarmingTime", Type = "CFloat"
     };
     renderingPlane = new CName(cr2w)
     {
         Name = "renderingPlane", Type = "CName"
     };
 }
Exemple #25
0
 public CSwarmCellMap(CR2WFile cr2w, CVariable parent, string name) : base(cr2w, parent, name)
 {
     Data = new CBytes(cr2w, this, nameof(Data))
     {
         IsSerialized = true
     };
     CornerPositionX = new CFloat(cr2w, this, nameof(CornerPositionX))
     {
         IsSerialized = true
     };
     CornerPositionY = new CFloat(cr2w, this, nameof(CornerPositionY))
     {
         IsSerialized = true
     };
     CornerPositionZ = new CFloat(cr2w, this, nameof(CornerPositionZ))
     {
         IsSerialized = true
     };
     DataSizeX = new CInt32(cr2w, this, nameof(DataSizeX))
     {
         IsSerialized = true
     };
     DataSizeY = new CInt32(cr2w, this, nameof(DataSizeY))
     {
         IsSerialized = true
     };
     DataSizeZ = new CInt32(cr2w, this, nameof(DataSizeZ))
     {
         IsSerialized = true
     };
     DataSizeBits = new CInt32(cr2w, this, nameof(DataSizeBits))
     {
         IsSerialized = true
     };
     SizeInKbytes = new CFloat(cr2w, this, nameof(SizeInKbytes))
     {
         IsSerialized = true
     };
 }
Exemple #26
0
 public SUmbraSceneData(CR2WFile cr2w) :
     base(cr2w)
 {
     positionX = new CFloat(cr2w)
     {
         Name = nameof(positionX)
     };
     positionY = new CFloat(cr2w)
     {
         Name = nameof(positionY)
     };
     positionZ = new CFloat(cr2w)
     {
         Name = nameof(positionZ)
     };
     positionW = new CFloat(cr2w)
     {
         Name = nameof(positionW)
     };
     umbratile = new CHandle(cr2w)
     {
         Name = nameof(umbratile)
     };
 }
Exemple #27
0
 public CPaddedBuffer(CR2WFile cr2w, CVariable parent, string name) : base(cr2w, parent, name)
 {
     padding = new CFloat(cr2w, this, "padding");
 }
Exemple #28
0
 public CDecalSpawner(CR2WFile cr2w) : base(cr2w)
 {
     material = new SDynamicDecalMaterialInfo(cr2w)
     {
         Name = "material", Type = "SDynamicDecalMaterialInfo"
     };
     farZ = new CFloat(cr2w)
     {
         Name = "farZ", Type = "CFloat"
     };
     nearZ = new CFloat(cr2w)
     {
         Name = "nearZ", Type = "CFloat"
     };
     ssize = new CPtr(cr2w)
     {
         Name = "size", Type = "IEvaluatorFloat"
     };
     depthFadePower = new CFloat(cr2w)
     {
         Name = "depthFadePower", Type = "CFloat"
     };
     normalFadeBias = new CFloat(cr2w)
     {
         Name = "normalFadeBias", Type = "CFloat"
     };
     normalFadeScale = new CFloat(cr2w)
     {
         Name = "normalFadeScale", Type = "CFloat"
     };
     doubleSided = new CBool(cr2w)
     {
         Name = "doubleSided", Type = "CBool"
     };
     projectionMode = new CName(cr2w)
     {
         Name = "projectionMode", Type = "CName"
     };
     decalLifetime = new CPtr(cr2w)
     {
         Name = "decalLifetime", Type = "IEvaluatorFloat"
     };
     decalFadeTime = new CFloat(cr2w)
     {
         Name = "decalFadeTime", Type = "CFloat"
     };
     decalFadeInTime = new CFloat(cr2w)
     {
         Name = "decalFadeInTime", Type = "CFloat"
     };
     projectOnlyOnStatic = new CBool(cr2w)
     {
         Name = "projectOnlyOnStatic", Type = "CBool"
     };
     startScale = new CFloat(cr2w)
     {
         Name = "startScale", Type = "CFloat"
     };
     scaleTime = new CFloat(cr2w)
     {
         Name = "scaleTime", Type = "CFloat"
     };
     useVerticalProjection = new CBool(cr2w)
     {
         Name = "useVerticalProjection", Type = "CBool"
     };
     spawnPriority = new CName(cr2w)
     {
         Name = "spawnPriority", Type = "CName"
     };
     autoHideDistance = new CFloat(cr2w)
     {
         Name = "autoHideDistance", Type = "CFloat"
     };
     spawnFrequency = new CFloat(cr2w)
     {
         Name = "spawnFrequency", Type = "CFloat"
     };
 }
Exemple #29
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);
            }
        }