All pastes #819450 Raw Edit

Mine

public text v1 · immutable
·published 2007-12-16 23:29 UTC
rendered paste body
#ifndef __RENDER_HPP__
#define __RENDER_HPP__

class CRender
{
public:
	virtual bool	Render(void)														{ return true; };
	virtual void	SendKeyboardDown(int nKeyCode, const char *cpBtnName, int nKeyChar)	{ return; };
	virtual void	SendKeyboardUp(int nKeyCode)										{ return; };
	virtual void	SendMouseDown(int nButton)											{ return; };
	virtual void	SendMouseUp(int nButton)											{ return; };
	virtual void	SendMouseMove(unsigned short unX, unsigned short unY)				{ return; };
};

class CPause : public CRender
{
public:
	bool			Render(void)														{ return true; };
	void			SendKeyboardDown(int nKeyCode, const char *cpBtnName, int nKeyChar)	{ return; };
	void			SendKeyboardUp(int nKeyCode)										{ return; };
	void			SendMouseDown(int nButton)											{ return; };
	void			SendMouseUp(int nButton)											{ return; };
	void			SendMouseMove(unsigned short unX, unsigned short unY)				{ return; };
};

#endif //__RENDER_HPP__


//snippit from core class:
	NORMALMSG("Initializing OpenGL...");
	if (!InitGL())		{ return false; }

	NORMALMSG("Initializing Input...");
	if (!InitInput())	{ return false; }

	m_qpPause	= new CPause;
	m_qpMenu	= new CMenu;
	m_qpGame	= new CGame;

	if (m_qpPause	== NULL ||
		m_qpMenu	== NULL ||
		m_qpGame	== NULL)
	{
		return false;
	}

	m_qpRender = m_qpMenu;
	return true;