Exemplo n.º 1
0
 public DATAField(BinaryFileReader r, int dataSize, GameFormat format)
 {
     if (format == GameFormat.TES3)
     {
         Weight          = r.ReadSingle();
         Value           = r.ReadInt32();
         Time            = r.ReadInt32();
         Radius          = r.ReadInt32();
         LightColor      = r.ReadT <ColorRef4>(4);
         Flags           = r.ReadInt32();
         FalloffExponent = 1;
         FOV             = 90;
         return;
     }
     Time       = r.ReadInt32();
     Radius     = r.ReadInt32();
     LightColor = r.ReadT <ColorRef4>(4);
     Flags      = r.ReadInt32();
     if (dataSize == 32)
     {
         FalloffExponent = r.ReadSingle();
         FOV             = r.ReadSingle();
     }
     else
     {
         FalloffExponent = 1;
         FOV             = 90;
     }
     Value  = r.ReadInt32();
     Weight = r.ReadSingle();
 }
Exemplo n.º 2
0
 public DATAField(BinaryFileReader r, int dataSize)
 {
     if (dataSize != 102 && dataSize != 86 && dataSize != 62 && dataSize != 42 && dataSize != 2)
     {
         WindVelocity = 1;
     }
     if (dataSize == 2)
     {
         Damage = r.ReadUInt16();
         return;
     }
     WindVelocity          = r.ReadSingle();
     WindDirection         = r.ReadSingle();
     WaveAmplitude         = r.ReadSingle();
     WaveFrequency         = r.ReadSingle();
     SunPower              = r.ReadSingle();
     ReflectivityAmount    = r.ReadSingle();
     FresnelAmount         = r.ReadSingle();
     ScrollXSpeed          = r.ReadSingle();
     ScrollYSpeed          = r.ReadSingle();
     FogDistance_NearPlane = r.ReadSingle();
     if (dataSize == 42)
     {
         Damage = r.ReadUInt16();
         return;
     }
     FogDistance_FarPlane = r.ReadSingle();
     ShallowColor         = r.ReadT <ColorRef4>(dataSize);
     DeepColor            = r.ReadT <ColorRef4>(dataSize);
     ReflectionColor      = r.ReadT <ColorRef4>(dataSize);
     TextureBlend         = r.ReadByte();
     r.Skip(3); // Unused
     if (dataSize == 62)
     {
         Damage = r.ReadUInt16();
         return;
     }
     RainSimulator_Force         = r.ReadSingle();
     RainSimulator_Velocity      = r.ReadSingle();
     RainSimulator_Falloff       = r.ReadSingle();
     RainSimulator_Dampner       = r.ReadSingle();
     RainSimulator_StartingSize  = r.ReadSingle();
     DisplacementSimulator_Force = r.ReadSingle();
     if (dataSize == 86)
     {
         //DisplacementSimulator_Velocity = DisplacementSimulator_Falloff = DisplacementSimulator_Dampner = DisplacementSimulator_StartingSize = 0F;
         Damage = r.ReadUInt16();
         return;
     }
     DisplacementSimulator_Velocity     = r.ReadSingle();
     DisplacementSimulator_Falloff      = r.ReadSingle();
     DisplacementSimulator_Dampner      = r.ReadSingle();
     DisplacementSimulator_StartingSize = r.ReadSingle();
     Damage = r.ReadUInt16();
 }
Exemplo n.º 3
0
 public MEDTField(BinaryFileReader r, int dataSize)
 {
     SpellSchool = r.ReadInt32();
     BaseCost    = r.ReadSingle();
     Flags       = r.ReadInt32();
     Color       = new ColorRef4 {
         Red = (byte)r.ReadInt32(), Green = (byte)r.ReadInt32(), Blue = (byte)r.ReadInt32(), Null = 255
     };
     SpeedX  = r.ReadSingle();
     SizeX   = r.ReadSingle();
     SizeCap = r.ReadSingle();
 }
Exemplo n.º 4
0
 public DATAField(BinaryFileReader r, int dataSize)
 {
     WindSpeed                    = r.ReadByte();
     CloudSpeed_Lower             = r.ReadByte();
     CloudSpeed_Upper             = r.ReadByte();
     TransDelta                   = r.ReadByte();
     SunGlare                     = r.ReadByte();
     SunDamage                    = r.ReadByte();
     Precipitation_BeginFadeIn    = r.ReadByte();
     Precipitation_EndFadeOut     = r.ReadByte();
     ThunderLightning_BeginFadeIn = r.ReadByte();
     ThunderLightning_EndFadeOut  = r.ReadByte();
     ThunderLightning_Frequency   = r.ReadByte();
     WeatherClassification        = r.ReadByte();
     LightningColor               = new ColorRef4 {
         Red = r.ReadByte(), Green = r.ReadByte(), Blue = r.ReadByte(), Null = 255
     };
 }
Exemplo n.º 5
0
            public ColorRef4       VertexShading; // RGB + Shading radius (0 - 200) %

            public RDOTField(BinaryFileReader r, int dataSize)
            {
                Object    = new FormId <Record>(r.ReadUInt32());
                ParentIdx = r.ReadUInt16();
                r.Skip(2); // Unused
                Density         = r.ReadSingle();
                Clustering      = r.ReadByte();
                MinSlope        = r.ReadByte();
                MaxSlope        = r.ReadByte();
                Flags           = r.ReadByte();
                RadiusWrtParent = r.ReadUInt16();
                Radius          = r.ReadUInt16();
                MinHeight       = r.ReadSingle();
                MaxHeight       = r.ReadSingle();
                Sink            = r.ReadSingle();
                SinkVariance    = r.ReadSingle();
                SizeVariance    = r.ReadSingle();
                AngleVariance   = new Vector3Int(r.ReadUInt16(), r.ReadUInt16(), r.ReadUInt16());
                r.Skip(2); // Unused
                VertexShading = r.ReadT <ColorRef4>(dataSize);
            }
Exemplo n.º 6
0
 public DATAField(BinaryFileReader r, int dataSize)
 {
     if (dataSize != 224 && dataSize != 96)
     {
         Flags = 0;
     }
     Flags = r.ReadByte();
     r.Skip(3); // Unused
     MembraneShader_SourceBlendMode            = r.ReadUInt32();
     MembraneShader_BlendOperation             = r.ReadUInt32();
     MembraneShader_ZTestFunction              = r.ReadUInt32();
     FillTextureEffect_Color                   = r.ReadT <ColorRef4>(dataSize);
     FillTextureEffect_AlphaFadeInTime         = r.ReadSingle();
     FillTextureEffect_FullAlphaTime           = r.ReadSingle();
     FillTextureEffect_AlphaFadeOutTime        = r.ReadSingle();
     FillTextureEffect_PresistentAlphaRatio    = r.ReadSingle();
     FillTextureEffect_AlphaPulseAmplitude     = r.ReadSingle();
     FillTextureEffect_AlphaPulseFrequency     = r.ReadSingle();
     FillTextureEffect_TextureAnimationSpeed_U = r.ReadSingle();
     FillTextureEffect_TextureAnimationSpeed_V = r.ReadSingle();
     EdgeEffect_FallOff               = r.ReadSingle();
     EdgeEffect_Color                 = r.ReadT <ColorRef4>(dataSize);
     EdgeEffect_AlphaFadeInTime       = r.ReadSingle();
     EdgeEffect_FullAlphaTime         = r.ReadSingle();
     EdgeEffect_AlphaFadeOutTime      = r.ReadSingle();
     EdgeEffect_PresistentAlphaRatio  = r.ReadSingle();
     EdgeEffect_AlphaPulseAmplitude   = r.ReadSingle();
     EdgeEffect_AlphaPulseFrequency   = r.ReadSingle();
     FillTextureEffect_FullAlphaRatio = r.ReadSingle();
     EdgeEffect_FullAlphaRatio        = r.ReadSingle();
     MembraneShader_DestBlendMode     = r.ReadUInt32();
     if (dataSize == 96)
     {
         return;
     }
     ParticleShader_SourceBlendMode              = r.ReadUInt32();
     ParticleShader_BlendOperation               = r.ReadUInt32();
     ParticleShader_ZTestFunction                = r.ReadUInt32();
     ParticleShader_DestBlendMode                = r.ReadUInt32();
     ParticleShader_ParticleBirthRampUpTime      = r.ReadSingle();
     ParticleShader_FullParticleBirthTime        = r.ReadSingle();
     ParticleShader_ParticleBirthRampDownTime    = r.ReadSingle();
     ParticleShader_FullParticleBirthRatio       = r.ReadSingle();
     ParticleShader_PersistantParticleBirthRatio = r.ReadSingle();
     ParticleShader_ParticleLifetime             = r.ReadSingle();
     ParticleShader_ParticleLifetime_Delta       = r.ReadSingle();
     ParticleShader_InitialSpeedAlongNormal      = r.ReadSingle();
     ParticleShader_AccelerationAlongNormal      = r.ReadSingle();
     ParticleShader_InitialVelocity1             = r.ReadSingle();
     ParticleShader_InitialVelocity2             = r.ReadSingle();
     ParticleShader_InitialVelocity3             = r.ReadSingle();
     ParticleShader_Acceleration1                = r.ReadSingle();
     ParticleShader_Acceleration2                = r.ReadSingle();
     ParticleShader_Acceleration3                = r.ReadSingle();
     ParticleShader_ScaleKey1     = r.ReadSingle();
     ParticleShader_ScaleKey2     = r.ReadSingle();
     ParticleShader_ScaleKey1Time = r.ReadSingle();
     ParticleShader_ScaleKey2Time = r.ReadSingle();
     ColorKey1_Color        = r.ReadT <ColorRef4>(dataSize);
     ColorKey2_Color        = r.ReadT <ColorRef4>(dataSize);
     ColorKey3_Color        = r.ReadT <ColorRef4>(dataSize);
     ColorKey1_ColorAlpha   = r.ReadSingle();
     ColorKey2_ColorAlpha   = r.ReadSingle();
     ColorKey3_ColorAlpha   = r.ReadSingle();
     ColorKey1_ColorKeyTime = r.ReadSingle();
     ColorKey2_ColorKeyTime = r.ReadSingle();
     ColorKey3_ColorKeyTime = r.ReadSingle();
 }