UltimateZoneBuilder/Source/Core/ZDoom/SoundInfo.cs
MaxED 53a317c0dd Updated, Visual mode: updated FLATSPRITE support to match the current GZDoom implementation.
Fixed, Visual mode: things in sectors affected by line slope effect were not updated when sector height was indirectly changed.
Game configurations: added "internalsoundnames" property.
Updated documentation ("Game Configuration - Basic Settings" page).
2016-10-04 09:53:38 +00:00

91 lines
1.8 KiB
C#

#region ================== Namespaces
using System;
using System.Collections.Generic;
#endregion
namespace CodeImp.DoomBuilder.ZDoom
{
public class SoundInfo
{
#region ================== Enums
public enum RolloffType
{
NONE,
INVALID,
CUSTOM,
LINEAR,
LOG
}
public enum SoundInfoType
{
SOUND,
GROUP_RANDOM,
}
#endregion
#region ================== Variables
private string name;
private List<SoundInfo> children;
private SoundInfoType type;
#endregion
#region ================== Properties
public string Name { get { return name; } }
public List<SoundInfo> Children { get { return children; } }
public SoundInfoType Type { get { return type; } internal set { type = value; } }
// Sound settings
public string LumpName;
public float Volume;
public float Attenuation;
public int MinimumDistance;
public int MaximumDistance;
public RolloffType Rolloff;
public float RolloffFactor;
#endregion
#region ================== Constructor
public SoundInfo(string name)
{
this.name = name;
children = new List<SoundInfo>();
type = SoundInfoType.SOUND;
// Set non-existent settings
Volume = float.MinValue;
Attenuation = float.MinValue;
MinimumDistance = int.MinValue;
MaximumDistance = int.MinValue;
Rolloff = RolloffType.INVALID;
RolloffFactor = float.MinValue;
}
// Default props constructor
internal SoundInfo()
{
this.name = "#GLOBAL_PROPERTIES#";
children = new List<SoundInfo>();
type = SoundInfoType.SOUND;
// Set non-existent settings
Volume = 1.0f;
Attenuation = 1.0f;
MinimumDistance = 200;
MaximumDistance = 1200;
Rolloff = RolloffType.NONE;
RolloffFactor = 1.0f; // Is this the default value?
}
#endregion
}
}