//////////////////////////////////////////////////////////////////////////////
//
// AVP_Profile_Controls.h
//
// (AJK - 04.08.2008) Created
//
// Copyright (c) 2008 Rebellion. All rights reserved.
//
//////////////////////////////////////////////////////////////////////////////

#ifndef __AVP_PROFILE_SOUNDS__
#define __AVP_PROFILE_SOUNDS__

//Forward declaration
class Asura_Chunk_Stream;

class AVP_Profile_Sounds
{

public:

	AVP_Profile_Sounds();

#if defined(ASURA_SUPPORT_COMMAND_CONSOLE)
	void SetupConsoleCommands();
	void SetupConsoleVariables();
	void RemoveConsoleVariables();
#endif	//defined(ASURA_SUPPORT_COMMAND_CONSOLE)

	void SetToDefaults();
    bool HasChanged();

	void WriteToChunkStream (Asura_Chunk_Stream& xStream);
	void ReadFromChunkStream(Asura_Chunk_Stream& xStream);
	static bool ConsoleCmd_OnDeInitSoundsOptions( bool bHelp);
	static u_int GetCurSpeciesSoundsMenuHash();

	// Setters
	void SetVolumeMaster	( float	fVolumeMaster )	{ m_fVolumeMaster = fVolumeMaster; }
	void SetVolumeSFX		( float	fVolumeSFX    )	{ m_fVolumeSFX    = fVolumeSFX;    }
	void SetVolumeMusic		( float	fVolumeMusic  )	{ m_fVolumeMusic  = fVolumeMusic;  }
	void SetVolumeSpeech	( float	fVolumeSpeech )	{ m_fVolumeSpeech = fVolumeSpeech; }
	void SetSubtitles		( bool	bSubtitles    )	{ m_bSubtitles    = bSubtitles;    }
	void SetSpeakerMode		( int	iSpeakerMode  );

	// Getters
	float GetVolumeMaster()		const { return m_fVolumeMaster;	}
	float GetVolumeSFX()		const { return m_fVolumeSFX;	}
	float GetVolumeMusic()		const { return m_fVolumeMusic;	}
	float GetVolumeSpeech()		const { return m_fVolumeSpeech;	}
	bool  GetShowSubtitles()	const { return m_bSubtitles;	}
	int   GetSpeakerMode()		const { return m_iSpeakerMode;	}

	bool  operator==(const AVP_Profile_Sounds& xOther) const;
	bool  operator!=(const AVP_Profile_Sounds& xOther) const;

	void Update();

	void ApplySettings();

private:

	enum 
	{
		CURRENT_CHUNK_VERSION = 2,
	};

	static const u_int s_uAVP_SOUNDS_MASTER	= 0xBF8D2A62; //Asura_GetHashID( "Master"); 
	static const u_int s_uAVP_SOUNDS_SFX	= 0x0001BC85; //Asura_GetHashID( "SFX"); 
	static const u_int s_uAVP_SOUNDS_MUSIC	= 0x0636EE25; //Asura_GetHashID( "Music");
	static const u_int s_uAVP_SOUNDS_SPEECH	= 0xCA9708E2; //Asura_GetHashID( "Speech");

	//Menus hashes
	static const u_int s_uAVP_PROFILE_FRONTEND_SOUNDS_MENU = 0x4038cf03; //Asura_GetHashID( "Options_Sound_FrontEnd");
	static const u_int s_uAVP_PROFILE_MARINE_SOUNDS_MENU   = 0x154F2A61; //Asura_GetHashID( "Marine_Confirm_Resolution");
	static const u_int s_uAVP_PROFILE_ALIEN_SOUNDS_MENU    = 0x7AABE1BC; //Asura_GetHashID( "Marine_Confirm_Resolution");
	static const u_int s_uAVP_PROFILE_PREDATOR_SOUNDS_MENU = 0x13B9DF8C; //Asura_GetHashID( "Marine_Confirm_Resolution");

	static void UpdateVolumeSFX();
	static void UpdateVolumeMusic();
	static void UpdateVolumeSpeech();

	float	m_fVolumeMaster;
	float	m_fVolumeSFX;
	float	m_fVolumeMusic;
	float	m_fVolumeSpeech;
	bool	m_bSubtitles;
	int		m_iSpeakerMode;	

	static const int m_iNumSpeakerModes = 4;



};



#endif // #ifndef __AVP_PROFILE_SOUNDS__
