public void Read( BinaryReader R ) { m_sourceFileName = new FileInfo( R.ReadString() ); m_name = R.ReadString(); m_version = R.ReadInt32(); m_programs.Read( R ); m_parms.Read( R ); m_states.Read( R ); m_options.Read( R ); m_layers.Clear(); int layersCount = R.ReadInt32(); for ( int layerIndex=0; layerIndex < layersCount; layerIndex++ ) { m_layers.Add( new Layer( this, layerIndex, R ) ); } m_height = R.ReadBoolean() ? new Layer.Texture( R ) : null; m_lightMap = R.ReadBoolean() ? new Layer.Texture( R ) : null; m_physicsMaterial = R.ReadString(); if ( m_physicsMaterial == "" ) m_physicsMaterial = null; m_glossMinMax.x = R.ReadSingle(); m_glossMinMax.y = R.ReadSingle(); m_metallicMinMax.x = R.ReadSingle(); m_metallicMinMax.y = R.ReadSingle(); m_isUsingVegetationParms = R.ReadBoolean(); m_isUsingCloudParms = R.ReadBoolean(); m_isUsingWaterParms = R.ReadBoolean(); // Read unknown strings that should be restored as-is ReadListOfStrings( R, m_unknownVariables ); ReadListOfStrings( R, m_forbiddenParms ); // Read errors and warnings m_errorLevel = (ERROR_LEVEL) R.ReadInt32(); m_errors = R.ReadString(); if ( m_errors == string.Empty ) m_errors = null; m_warnings = R.ReadString(); if ( m_warnings == string.Empty ) m_warnings = null; }
public void RaiseErrorLevel( ERROR_LEVEL _errorLevel ) { if ( (int) m_errorLevel < (int) _errorLevel ) m_errorLevel = _errorLevel; }
public void Read( BinaryReader R ) { m_diffuse = R.ReadBoolean() ? new Texture( R ) : null; m_diffuseReUse = (REUSE_MODE) R.ReadInt32(); m_normal = R.ReadBoolean() ? new Texture( R ) : null; m_normalReUse = (REUSE_MODE) R.ReadInt32(); m_gloss = R.ReadBoolean() ? new Texture( R ) : null; m_glossReUse = (REUSE_MODE) R.ReadInt32(); m_metal = R.ReadBoolean() ? new Texture( R ) : null; m_metalReUse = (REUSE_MODE) R.ReadInt32(); m_specular = R.ReadBoolean() ? new Texture( R ) : null; m_specularReUse = (REUSE_MODE) R.ReadInt32(); m_maskingMode = (MASKING_MODE) R.ReadInt32(); m_mask = R.ReadBoolean() ? new Texture( R ) : null; m_maskReUse = (REUSE_MODE) R.ReadInt32(); // Single textures m_AO = R.ReadBoolean() ? new Texture( R ) : null; m_translucency = R.ReadBoolean() ? new Texture( R ) : null; m_emissive = R.ReadBoolean() ? new Texture( R ) : null; // UV sets m_UVSet = (UV_SET) R.ReadInt32(); m_UVOffset.x = R.ReadSingle(); m_UVOffset.y = R.ReadSingle(); m_UVScale.x = R.ReadSingle(); m_UVScale.y = R.ReadSingle(); m_maskUVSet = (UV_SET) R.ReadInt32(); m_maskUVOffset.x = R.ReadSingle(); m_maskUVOffset.y = R.ReadSingle(); m_maskUVScale.x = R.ReadSingle(); m_maskUVScale.y = R.ReadSingle(); m_useColorConstant = R.ReadBoolean(); m_colorConstant.x = R.ReadSingle(); m_colorConstant.y = R.ReadSingle(); m_colorConstant.z = R.ReadSingle(); m_colorConstant.w = R.ReadSingle(); m_errorLevel = (ERROR_LEVEL) R.ReadInt32(); m_errors = R.ReadString(); if ( m_errors == string.Empty ) m_errors = null; m_warnings = R.ReadString(); if ( m_warnings == string.Empty ) m_warnings = null; }
public void ClearErrorLevel() { m_errorLevel = ERROR_LEVEL.NONE; }
public LinearAudioPlayerException(ERROR_LEVEL errorLevel, string message) : base(message) { this.ErrorLevel = errorLevel; }