// ----------------------------------------------------------------------- //
//
// MODULE  : SoundTypes.h
//
// PURPOSE : Sound types
//
// CREATED : 11/12/97
//
// ----------------------------------------------------------------------- //

#ifndef __SOUND_TYPES_H__
#define __SOUND_TYPES_H__

enum UserSoundTypes
{
	USERSOUNDTYPE_SOUNDEFFECT = 0,
	USERSOUNDTYPE_MUSIC = 1
};

enum SoundPriority
{
	SOUNDPRIORITY_MIN = 0,

	SOUNDPRIORITYBASE_MISC		= 0,
	SOUNDPRIORITYBASE_AI		= 2,
	SOUNDPRIORITYBASE_PLAYER	= 4,

	SOUNDPRIORITYMOD_LOW		= 0,
	SOUNDPRIORITYMOD_MEDIUM		= 1,
	SOUNDPRIORITYMOD_HIGH		= 2,

    SOUNDPRIORITY_MISC_LOW		= SOUNDPRIORITYBASE_MISC + SOUNDPRIORITYMOD_LOW,
	SOUNDPRIORITY_MISC_MEDIUM	= SOUNDPRIORITYBASE_MISC + SOUNDPRIORITYMOD_MEDIUM,
	SOUNDPRIORITY_MISC_HIGH		= SOUNDPRIORITYBASE_MISC + SOUNDPRIORITYMOD_HIGH,
	SOUNDPRIORITY_AI_LOW		= SOUNDPRIORITYBASE_AI + SOUNDPRIORITYMOD_LOW,
	SOUNDPRIORITY_AI_MEDIUM		= SOUNDPRIORITYBASE_AI + SOUNDPRIORITYMOD_MEDIUM,
	SOUNDPRIORITY_AI_HIGH		= SOUNDPRIORITYBASE_AI + SOUNDPRIORITYMOD_HIGH,
	SOUNDPRIORITY_PLAYER_LOW	= SOUNDPRIORITYBASE_PLAYER + SOUNDPRIORITYMOD_LOW,
	SOUNDPRIORITY_PLAYER_MEDIUM = SOUNDPRIORITYBASE_PLAYER + SOUNDPRIORITYMOD_MEDIUM,
	SOUNDPRIORITY_PLAYER_HIGH	= SOUNDPRIORITYBASE_PLAYER + SOUNDPRIORITYMOD_HIGH,

	SOUNDPRIORITY_MAX = SOUNDPRIORITY_PLAYER_HIGH
};

inline SoundPriority & operator+=(SoundPriority & x, const SoundPriority & y)
{
	if( int(x) + int(y) > SOUNDPRIORITY_MAX )
	{
		x = SOUNDPRIORITY_MAX;
	}
	else
	{
		x = SoundPriority(int(x) + int(y));
	}

	return x;
}

inline SoundPriority operator+(SoundPriority x, SoundPriority y)
{
	x += y;
	return x;
}

#endif // __SOUND_TYPES_H__
