/**
* FX System
* @version: 02-28-2005
* @author Joseph 'Pcjoe' Florencio
*/

#ifndef FXSYS_H
#define FXSYS_H

// HL Headers
#include "../hud.h"
#include "../cl_util.h"
#include "const.h"

// GL Headers
#include <gl\gl.h>
#include <gl\glu.h>
#include <gl\glaux.h>
#include "glext.h"

#include "../Vrml.h"

#include "../common/quaternion.h"
#include "xmlinterface.h"
#include "fxevent.h"
#include "fxtexturemanager.h"
#include "fxscreeneffects.h"

class CFXSystem
{
public:
	// Constructor/Destructor
	CFXSystem();
	~CFXSystem();

	// Reset
	void Reset( void );

	// Think
	void Think( void );

	// Render
	void Render( void );

	// Set Developer Event
	void setDeveloperEvent( CFXEvent* pDev );

	// Reset Developer Event
	void resetDeveloperEvent( void );

	// Add Event
	void addEvent( CFXEvent *pEvent );

	// Remove Event
	std::list<CFXEvent*>::iterator removeEvent( std::list<CFXEvent*>::iterator iterRemove );

	// Remove Event
	std::list<CFXEvent*>::iterator removeEvent( CFXEvent* pRemove );

	// ** Camera Functionality

	/*
	* Accessors
	*/
	// Event List
	std::list<CFXEvent*> &getEventList( void ) { return m_EventList; }

	// Developer Event
	CFXEvent* getDeveloperEvent( void ) { return m_pDeveloperEvent; }

	// Developer Event Time
	void setDeveloperEventTime( float flTime ) { m_flDevEventTime = flTime; }
	float getDeveloperEventTime( void ) { return m_flDevEventTime; }

	// Camera in use
	void setUsingCamera(bool bUsingCamera ) { m_bCamSet = bUsingCamera; }
	bool usingCamera() { return m_bCamSet; }

	// Camera position and angle
	void setCameraPosition(vec3_t vecPos) { m_vecCamPos = vecPos; }
	vec3_t getCameraPosition() { return m_vecCamPos; }
	void setCameraAngle(vec3_t vecAng) { m_vecCamAng = vecAng; }
	vec3_t getCameraAngle() { return m_vecCamAng; }
private:
	std::list<CFXEvent*>	m_EventList;
	CFXEvent				*m_pDeveloperEvent;
	float					m_flDevEventTime;
	bool					m_bCamSet;
	vec3_t					m_vecCamPos;
	vec3_t					m_vecCamAng;
};

extern CFXSystem g_FXSystem;

#endif