Beispiel #1
0
void RenderFrameDX9(void)
{
	LPDIRECT3DDEVICE9 device = GutGetGraphicsDeviceDX9();
	
	device->BeginScene(); 

	ParticleSimulation();
	RenderParticle();
	SwapTextures();

	float x = -1.0f;
	float y = -1.0f;
	float w = 0.4f;
	float h = 0.4f;

	device->SetRenderTarget(0, g_pMainFramebuffer);
	device->SetDepthStencilSurface(g_pMainDepthbuffer);

	if ( g_iMode & 0x01 )
	{
		DrawImage(g_pTextures[TEX_POSITION0], x, y, w, h, &g_ImageInfo);
		x+=w;
	}

	if ( g_iMode & 0x02 )
	{
		DrawImage(g_pTextures[TEX_VELOCITY1], x, y, w, h, &g_ImageInfo);
		x+=w;
	}

	device->EndScene(); 
    device->Present( NULL, NULL, NULL, NULL );
}
Beispiel #2
0
void Scene::UpdateParticle(Particle* particle)
{
	//vec3 speed = particle->m_speed;
	//vec3 position = particle->GetPosition();
	//vec3 velocity = particle->m_velocity;

	//glUniform3f(m_GSM->GetGLManager()->GetUnifrom(PARTICLE_SPD), speed.x, speed.y, speed.z);
	//glUniform3f(m_GSM->GetGLManager()->GetUnifrom(PARTICLE_POS), position.x, position.y, position.z);
	//glUniform3f(m_GSM->GetGLManager()->GetUnifrom(PARTICLE_VEL), velocity.x, velocity.y, velocity.z);

	//glUniform1f(m_GSM->GetGLManager()->GetUnifrom(PARTICLE_LIFE), particle->m_life);
	//glUniform1f(m_GSM->GetGLManager()->GetUnifrom(PARTICLE_FADE), particle->m_fade);
	//glUniform1f(m_GSM->GetGLManager()->GetUnifrom(PARTICLE_ROT), particle->GetRotation());

	// Render usual particle
	if (particle->m_life > 0.f)
		RenderParticle(particle);

	// refresh particle's info
	else
		RefreshParticle(particle);
}
Beispiel #3
0
/*!****************************************************************************
 @Function		RenderScene
 @Return		bool		true if no error occured
 @Description	Main rendering loop function of the program. The shell will
				call this function every frame.
				eglSwapBuffers() will be performed by PVRShell automatically.
				PVRShell will also manage important OS events.
				Will also manage relevent OS events. The user has access to
				these events through an abstraction layer provided by PVRShell.
******************************************************************************/
bool OGLESParticles::RenderScene()
{
	int				i;
	PVRTMat4		mRotY;

	// Clear colour and depth buffers
	myglClearColor(f2vt(0.0f), f2vt(0.0f), f2vt(0.0f), f2vt(1.0f));
	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

	// Enables depth testing
	glEnable(GL_DEPTH_TEST);

	//	Modify per-frame variables controlling the particle mouvements.
	float fSpeedCtrl = (float) (PVRTFSIN(m_fRot*0.01f)+1.0f)/2.0f;
	float fStopNo = 0.8f;
	float fStep = 0.1f;

	if(fSpeedCtrl > fStopNo)
		fStep = 0.0f;

	// Generate particles as needed.
	if((m_i32NumParticles < (int) g_ui32MaxParticles) && (fSpeedCtrl <= fStopNo))
	{
		int num_to_gen = (int) (RandPositiveFloat()*(g_ui32MaxParticles/100.0));

		if(num_to_gen == 0)
			num_to_gen = 1;

		for(i = 0; (i < num_to_gen) && (m_i32NumParticles < (int) g_ui32MaxParticles); ++i)
			SpawnParticle(&m_Particles[m_i32NumParticles++]);
	}

	// Build rotation matrix around axis Y.
	mRotY = PVRTMat4::RotationY(f2vt((m_fRot2*PVRT_PIf)/180.0f));

	for(i = 0; i < m_i32NumParticles; ++i)
	{
		// Transform particle with rotation matrix
		m_sParticleVTXPSBuf[i].x =	VERTTYPEMUL(mRotY.f[ 0], m_Particles[i].m_fPosition.x) +
								VERTTYPEMUL(mRotY.f[ 4], m_Particles[i].m_fPosition.y) +
								VERTTYPEMUL(mRotY.f[ 8], m_Particles[i].m_fPosition.z) +
											mRotY.f[12];
		m_sParticleVTXPSBuf[i].y =	VERTTYPEMUL(mRotY.f[ 1], m_Particles[i].m_fPosition.x) +
								VERTTYPEMUL(mRotY.f[ 5], m_Particles[i].m_fPosition.y) +
								VERTTYPEMUL(mRotY.f[ 9], m_Particles[i].m_fPosition.z) +
											mRotY.f[13];
		m_sParticleVTXPSBuf[i].z =	VERTTYPEMUL(mRotY.f[ 2], m_Particles[i].m_fPosition.x) +
								VERTTYPEMUL(mRotY.f[ 6], m_Particles[i].m_fPosition.y) +
								VERTTYPEMUL(mRotY.f[10], m_Particles[i].m_fPosition.z) +
											mRotY.f[14];

		m_sParticleVTXPSBuf[i].fSize = m_Particles[i].m_fSize;

		m_sNormalColour[i].r  = vt2b(m_Particles[i].m_fColour.x);
		m_sNormalColour[i].g  = vt2b(m_Particles[i].m_fColour.y);
		m_sNormalColour[i].b  = vt2b(m_Particles[i].m_fColour.z);
		m_sNormalColour[i].a  = (unsigned char)255;

		m_sReflectColour[i].r  = vt2b(VERTTYPEMUL(m_Particles[i].m_fColour.x, g_fFactor));
		m_sReflectColour[i].g  = vt2b(VERTTYPEMUL(m_Particles[i].m_fColour.y, g_fFactor));
		m_sReflectColour[i].b  = vt2b(VERTTYPEMUL(m_Particles[i].m_fColour.z, g_fFactor));
		m_sReflectColour[i].a  = (unsigned char)255;
	}

	glBindBuffer(GL_ARRAY_BUFFER, m_i32VertVboID);
	glBufferData(GL_ARRAY_BUFFER, sizeof(SVtxPointSprite)*m_i32NumParticles, m_sParticleVTXPSBuf,GL_DYNAMIC_DRAW);

	glBindBuffer(GL_ARRAY_BUFFER, m_i32ColAVboID);
	glBufferData(GL_ARRAY_BUFFER, sizeof(SColors)*m_i32NumParticles, m_sNormalColour,GL_DYNAMIC_DRAW);

	glBindBuffer(GL_ARRAY_BUFFER, m_i32ColBVboID);
	glBufferData(GL_ARRAY_BUFFER, sizeof(SColors)*m_i32NumParticles, m_sReflectColour,GL_DYNAMIC_DRAW);

	// clean up render states
	glDisable(GL_BLEND);
	glDisable(GL_TEXTURE_2D);
	glEnable(GL_LIGHTING);

	//	Draw floor.

	// Save modelview matrix
	glMatrixMode(GL_MODELVIEW);
	glPushMatrix();
	myglRotate(f2vt(-m_fRot), f2vt(0.0f), f2vt(1.0f), f2vt(0.0f));

	// setup render states
	glDisable(GL_LIGHTING);
	glEnable(GL_TEXTURE_2D);
	glDisable(GL_CULL_FACE);
	glEnable(GL_BLEND);

	// Set texture and texture environment
	glBindTexture(GL_TEXTURE_2D, m_ui32FloorTexName);
	glBlendFunc(GL_ONE, GL_ONE);

	// Render floor
	RenderFloor();

	// clean up render states
	glDisable(GL_BLEND);
	glDisable(GL_TEXTURE_2D);
	glEnable(GL_LIGHTING);

	glPopMatrix();

	//	Render particles reflections.

	// set up render states
	glDisable(GL_LIGHTING);
	glEnable(GL_TEXTURE_2D);

	glDepthFunc(GL_ALWAYS);
	glDisable(GL_CULL_FACE);

	glEnable(GL_BLEND);
	glBlendFunc(GL_ONE, GL_ONE);

	myglTexEnv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
	glBindTexture(GL_TEXTURE_2D, m_ui32TexName);

	// Set model view matrix
	glMatrixMode(GL_MODELVIEW);
	glPushMatrix();

	myglScale(f2vt(1.0f), f2vt(-1.0f), f2vt(1.0f));
	myglTranslate(f2vt(0.0f), f2vt(0.01f), f2vt(0.0f));

	glEnable(GL_POINT_SPRITE_OES);

	if(((int)(m_i32NumParticles * 0.5f)) > 0)
       RenderParticle(((int)(m_i32NumParticles*0.5f)),true);

	glPopMatrix();

	//	Render particles.

	// Sets the model view matrix
	glMatrixMode(GL_MODELVIEW);
	glPushMatrix();

	if(m_i32NumParticles > 0)
        RenderParticle(m_i32NumParticles,false);

	glPopMatrix();

	glDisable(GL_POINT_SPRITE_OES);

	PVRTVec3 Force = PVRTVec3(f2vt(0.0f), f2vt(0.0f), f2vt(0.0f));
	Force.x = f2vt(1000.0f*(float)PVRTFSIN(m_fRot*0.01f));

	for(i = 0; i < m_i32NumParticles; ++i)
	{
		/*
			Move the particle.
			If the particle exceeds its lifetime, create a new one in its place.
		*/
		if(m_Particles[i].Step(f2vt(fStep), Force))
			SpawnParticle(&m_Particles[i]);
	}

	// clean up render states
	glDisable(GL_BLEND);
	glDisable(GL_TEXTURE_2D);
	glEnable(GL_LIGHTING);

	// Increase rotation angles
	m_fRot += 1;
	m_fRot2 = m_fRot + 36;

	// Unbinds the vertex buffer if we are using OpenGL ES 1.1
	glBindBuffer(GL_ARRAY_BUFFER, 0);

	// Display info text.
	m_Print3D.DisplayDefaultTitle("Particles", "Using point sprites", ePVRTPrint3DSDKLogo);
	m_Print3D.Flush();

	return true;
}
/*
====================
DrawParticles

====================
*/
void CParticleEngine::DrawParticles( void ) 
{
	if(m_pCvarDrawParticles->value <= 0)
		return;

	AngleVectors(gBSPRenderer.m_vViewAngles, m_vForward, m_vRight, m_vUp);

	RenderFog();
	gBSPRenderer.SetTexEnvs(ENVSTATE_REPLACE, ENVSTATE_OFF, ENVSTATE_OFF, ENVSTATE_OFF);

	gBSPRenderer.glActiveTextureARB(GL_TEXTURE0_ARB);
	glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB);
	glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE);
	glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE);
	glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PRIMARY_COLOR_ARB);

	glEnable(GL_BLEND);
	glDepthMask(GL_FALSE);
	glDisable(GL_CULL_FACE);

	float flUp;
	float flRight;

	particle_system_t *psystem = m_pSystemHeader;
	while(psystem)
	{
		// Check if there's any particles at all
		if(!psystem->particleheader)
		{
			particle_system_t *pnext = psystem->next;
			psystem = pnext;
			continue;
		}

		// Check if it's in VIS
		if(psystem->leaf)
		{
			if(psystem->leaf->visframe != gBSPRenderer.m_iVisFrame)
			{
				particle_system_t *pnext = psystem->next;
				psystem = pnext;
				continue;
			}
		}

		// Calculate up and right scalers
		if(psystem->numframes)
		{
			if(psystem->framesizex > psystem->framesizey)
			{
				flUp = (float)psystem->framesizey/(float)psystem->framesizex;
				flRight = 1.0;
			}
			else
			{
				flRight = (float)psystem->framesizex/(float)psystem->framesizey;
				flUp = 1.0;
			}
		}
		else
		{
			if(psystem->texture->iWidth > psystem->texture->iHeight)
			{
				flUp = (float)psystem->texture->iHeight/(float)psystem->texture->iWidth;
				flRight = 1.0;
			}
			else
			{
				flRight = (float)psystem->texture->iWidth/(float)psystem->texture->iHeight;
				flUp = 1.0;
			}
		}

		if(psystem->displaytype == SYSTEM_DISPLAY_PARALELL)
		{
			VectorCopy(m_vRight, m_vRRight);
			VectorClear(m_vRUp); m_vRUp[2] = 1;
		}
		else if(!psystem->rotationvel && !psystem->rotxvel && !psystem->rotyvel)
		{
			VectorCopy(m_vRight, m_vRRight);
			VectorCopy(m_vUp, m_vRUp);
		}

		if(psystem->overbright)
			glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, 2);

		// Bind texture
		gBSPRenderer.Bind2DTexture(GL_TEXTURE0_ARB, psystem->texture->iIndex);

		// Render all particles tied to this system
		cl_particle_t *pparticle = psystem->particleheader;
		while(pparticle)
		{
			RenderParticle(pparticle, flUp, flRight);
			cl_particle_t *pnext = pparticle->next;
			pparticle = pnext;
		}

		// Reset
		if(psystem->overbright)
			glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, 1);

		particle_system_t *pnext = psystem->next;
		psystem = pnext;
	}

	glFogfv(GL_FOG_COLOR, gHUD.m_pFogSettings.color);
	glDepthMask(GL_TRUE);
	glDisable(GL_BLEND);
	glEnable(GL_CULL_FACE);
	glColor4f(GL_ONE, GL_ONE, GL_ONE, GL_ONE);
}
Beispiel #5
0
void nGame::Render()
{
	// Draw silos
	for(unsigned long i = 0; i < m_Silos.size(); i++)
		RenderSilo(m_Silos[i]);

	// Draw missle data
	for(unsigned long i = 0; i < m_Missles.size(); i++)
		RenderMissle(m_Missles[i]);

	// Draw explosion data
	for(unsigned long i = 0; i < m_Explosions.size(); i++)
		RenderExplosion(m_Explosions[i]);

	// Draw particle data
	for(unsigned long i = 0; i < m_Particles.size(); i++)
		RenderParticle(m_Particles[i]);

	// Draw the cursor
	if(nGetInstance()->GetInput()->GetMouse()->GetButton(nMouse::ButtonLeft) || nGetInstance()->GetInput()->GetMouse()->GetButton(nMouse::ButtonRight))
		nGetInstance()->GetGraphics()->DrawCursor(nGetInstance()->GetInput()->GetMouse()->GetPosition(),2,4,nGetInstance()->GetAbsoluteTime() * 10.0f,nColor(1.0f,1.0f,1.0f));
	else
		nGetInstance()->GetGraphics()->DrawCursor(nGetInstance()->GetInput()->GetMouse()->GetPosition(),2,6,0.0f,nColor(1.0f,1.0f,1.0f));

	// Draw the players score
	char buffer[512],buffer2[512];
	_snprintf(buffer,sizeof(buffer),"Score %d\nHealth %d\nLevel %d",m_Score,m_Health,(unsigned long)(30 - m_MissleTime));
	nGetInstance()->GetGraphics()->DrawText(nGetInstance()->GetGraphics()->GetBoldFont(),nRect(5,5,nGetInstance()->GetGraphics()->GetDisplaySize().cx - 5,0),buffer,DT_NOCLIP|DT_RIGHT,COLOR_TEXT);

	if(m_Pause)
	{
		unsigned long y = nGetInstance()->GetGraphics()->GetDisplaySize().cy / 3;
		nRect rect,rect2;

		_snprintf(buffer,sizeof(buffer),"Paused");

		nGetInstance()->GetGraphics()->GetTextRect(nGetInstance()->GetGraphics()->GetBoldFont(),buffer,&rect,NULL);
		nGetInstance()->GetGraphics()->DrawPrintLine(nGetInstance()->GetGraphics()->GetBoldFont(),nRect(nGetInstance()->GetGraphics()->GetDisplaySize().cx / 2 - rect.GetWidth() / 2,y,0,0),buffer,100.0f * (nGetInstance()->GetAbsoluteTime() - m_PauseTime),DT_NOCLIP,nColor(abs(sinf(nGetInstance()->GetAbsoluteTime())),COLOR_TEXT));

		y += rect.GetHeight();
		y += rect.GetHeight();

		static char time[100];
		GetTimeFormat(LOCALE_USER_DEFAULT,NULL,NULL,NULL,time,100);

		static char date[100];
		GetDateFormat(LOCALE_USER_DEFAULT,DATE_LONGDATE,NULL,NULL,date,100);

		_snprintf(buffer,sizeof(buffer),"Current time is");
		_snprintf(buffer2,sizeof(buffer2)," %s %s",time,date);

		nGetInstance()->GetGraphics()->GetTextRect(nGetInstance()->GetGraphics()->GetBoldFont(),buffer,&rect,NULL);
		nGetInstance()->GetGraphics()->GetTextRect(nGetInstance()->GetGraphics()->GetBoldFont(),buffer2,&rect2,NULL);

		nGetInstance()->GetGraphics()->DrawPrintLine(nGetInstance()->GetGraphics()->GetBoldFont(),nRect(nGetInstance()->GetGraphics()->GetDisplaySize().cx / 2 - rect.GetWidth() / 2 - rect2.GetWidth() / 2,y,0,0),buffer,100.0f * (nGetInstance()->GetAbsoluteTime() - m_PauseTime),DT_NOCLIP,nColor(0.25f,COLOR_TEXT));
		nGetInstance()->GetGraphics()->DrawPrintLine(nGetInstance()->GetGraphics()->GetBoldFont(),nRect(nGetInstance()->GetGraphics()->GetDisplaySize().cx / 2 + rect.GetWidth() / 2 - rect2.GetWidth() / 2,y,0,0),buffer2,100.0f * (nGetInstance()->GetAbsoluteTime() - m_PauseTime),DT_NOCLIP,nColor(0.5f,COLOR_TEXT));

		y += rect.GetHeight();
		y += rect.GetHeight();

		// Draw the hiscores if any
		if(m_HiScores.size())
		{
			_snprintf(buffer,sizeof(buffer),"Time");

			nGetInstance()->GetGraphics()->GetTextRect(nGetInstance()->GetGraphics()->GetBoldFont(),buffer,&rect,NULL);
			nGetInstance()->GetGraphics()->DrawPrintLine(nGetInstance()->GetGraphics()->GetBoldFont(),nRect(nGetInstance()->GetGraphics()->GetDisplaySize().cx / 2 - rect.GetWidth() - 10,y,0,0),buffer,100.0f * (nGetInstance()->GetAbsoluteTime() - m_PauseTime),DT_NOCLIP,COLOR_TEXT);

			_snprintf(buffer,sizeof(buffer),"Score");

			nGetInstance()->GetGraphics()->GetTextRect(nGetInstance()->GetGraphics()->GetBoldFont(),buffer,&rect,NULL);
			nGetInstance()->GetGraphics()->DrawPrintLine(nGetInstance()->GetGraphics()->GetBoldFont(),nRect(nGetInstance()->GetGraphics()->GetDisplaySize().cx / 2 + 10,y,0,0),buffer,100.0f * (nGetInstance()->GetAbsoluteTime() - m_PauseTime),DT_NOCLIP,COLOR_TEXT);

			y += rect.GetHeight();
			y += rect.GetHeight();

			for(unsigned long i = 0; i < m_HiScores.size(); i++)
			{
				_snprintf(buffer,sizeof(buffer),"%s",m_HiScores[i].time.c_str());

				nGetInstance()->GetGraphics()->GetTextRect(nGetInstance()->GetGraphics()->GetBoldFont(),buffer,&rect,NULL);
				nGetInstance()->GetGraphics()->DrawPrintLine(nGetInstance()->GetGraphics()->GetBoldFont(),nRect(nGetInstance()->GetGraphics()->GetDisplaySize().cx / 2 - rect.GetWidth() - 10,y,0,0),buffer,100.0f * (nGetInstance()->GetAbsoluteTime() - m_PauseTime),DT_NOCLIP,nColor(0.25f,COLOR_TEXT));
				
				_snprintf(buffer,sizeof(buffer),"%d",m_HiScores[i].score);

				nGetInstance()->GetGraphics()->GetTextRect(nGetInstance()->GetGraphics()->GetBoldFont(),buffer,&rect,NULL);
				nGetInstance()->GetGraphics()->DrawPrintLine(nGetInstance()->GetGraphics()->GetBoldFont(),nRect(nGetInstance()->GetGraphics()->GetDisplaySize().cx / 2 + 10,y,0,0),buffer,100.0f * (nGetInstance()->GetAbsoluteTime() - m_PauseTime),DT_NOCLIP,nColor(0.5f,COLOR_TEXT));

				y += rect.GetHeight();
			}

			y += rect.GetHeight();
		}

		_snprintf(buffer,sizeof(buffer),"Command");

		nGetInstance()->GetGraphics()->GetTextRect(nGetInstance()->GetGraphics()->GetBoldFont(),buffer,&rect,NULL);
		nGetInstance()->GetGraphics()->DrawPrintLine(nGetInstance()->GetGraphics()->GetBoldFont(),nRect(nGetInstance()->GetGraphics()->GetDisplaySize().cx / 2 - rect.GetWidth() - 10,y,0,0),buffer,100.0f * (nGetInstance()->GetAbsoluteTime() - m_PauseTime),DT_NOCLIP,COLOR_TEXT);

		_snprintf(buffer,sizeof(buffer),"Button");

		nGetInstance()->GetGraphics()->GetTextRect(nGetInstance()->GetGraphics()->GetBoldFont(),buffer,&rect,NULL);
		nGetInstance()->GetGraphics()->DrawPrintLine(nGetInstance()->GetGraphics()->GetBoldFont(),nRect(nGetInstance()->GetGraphics()->GetDisplaySize().cx / 2 + 10,y,0,0),buffer,100.0f * (nGetInstance()->GetAbsoluteTime() - m_PauseTime),DT_NOCLIP,COLOR_TEXT);

		y += rect.GetHeight();
		y += rect.GetHeight();

		nString keyboard = nGetInstance()->GetInput()->GetKeyboard()->GetDeviceName();
		nString mouse = nGetInstance()->GetInput()->GetMouse()->GetDeviceName();

		_snprintf(buffer,sizeof(buffer),"Pause/Unpause");

		nGetInstance()->GetGraphics()->GetTextRect(nGetInstance()->GetGraphics()->GetBoldFont(),buffer,&rect,NULL);
		nGetInstance()->GetGraphics()->DrawPrintLine(nGetInstance()->GetGraphics()->GetBoldFont(),nRect(nGetInstance()->GetGraphics()->GetDisplaySize().cx / 2 - rect.GetWidth() - 10,y,0,0),buffer,100.0f * (nGetInstance()->GetAbsoluteTime() - m_PauseTime),DT_NOCLIP,nColor(0.25f,COLOR_TEXT));
				
		_snprintf(buffer,sizeof(buffer),"%s %s or %s %s",keyboard.c_str(),nGetInstance()->GetInput()->GetKeyboard()->GetKeyName(DIK_PAUSE).c_str(),keyboard.c_str(),nGetInstance()->GetInput()->GetKeyboard()->GetKeyName(DIK_P).c_str());

		nGetInstance()->GetGraphics()->GetTextRect(nGetInstance()->GetGraphics()->GetBoldFont(),buffer,&rect,NULL);
		nGetInstance()->GetGraphics()->DrawPrintLine(nGetInstance()->GetGraphics()->GetBoldFont(),nRect(nGetInstance()->GetGraphics()->GetDisplaySize().cx / 2 + 10,y,0,0),buffer,100.0f * (nGetInstance()->GetAbsoluteTime() - m_PauseTime),DT_NOCLIP,nColor(0.5f,COLOR_TEXT));

		y += rect.GetHeight();

		_snprintf(buffer,sizeof(buffer),"Fire missle");

		nGetInstance()->GetGraphics()->GetTextRect(nGetInstance()->GetGraphics()->GetBoldFont(),buffer,&rect,NULL);
		nGetInstance()->GetGraphics()->DrawPrintLine(nGetInstance()->GetGraphics()->GetBoldFont(),nRect(nGetInstance()->GetGraphics()->GetDisplaySize().cx / 2 - rect.GetWidth() - 10,y,0,0),buffer,100.0f * (nGetInstance()->GetAbsoluteTime() - m_PauseTime),DT_NOCLIP,nColor(0.25f,COLOR_TEXT));
				
		_snprintf(buffer,sizeof(buffer),"%s %s",mouse.c_str(),nGetInstance()->GetInput()->GetMouse()->GetButtonName(nMouse::ButtonLeft).c_str());

		nGetInstance()->GetGraphics()->GetTextRect(nGetInstance()->GetGraphics()->GetBoldFont(),buffer,&rect,NULL);
		nGetInstance()->GetGraphics()->DrawPrintLine(nGetInstance()->GetGraphics()->GetBoldFont(),nRect(nGetInstance()->GetGraphics()->GetDisplaySize().cx / 2 + 10,y,0,0),buffer,100.0f * (nGetInstance()->GetAbsoluteTime() - m_PauseTime),DT_NOCLIP,nColor(0.5f,COLOR_TEXT));

		y += rect.GetHeight();

		_snprintf(buffer,sizeof(buffer),"Fire cannon");

		nGetInstance()->GetGraphics()->GetTextRect(nGetInstance()->GetGraphics()->GetBoldFont(),buffer,&rect,NULL);
		nGetInstance()->GetGraphics()->DrawPrintLine(nGetInstance()->GetGraphics()->GetBoldFont(),nRect(nGetInstance()->GetGraphics()->GetDisplaySize().cx / 2 - rect.GetWidth() - 10,y,0,0),buffer,100.0f * (nGetInstance()->GetAbsoluteTime() - m_PauseTime),DT_NOCLIP,nColor(0.25f,COLOR_TEXT));
				
		_snprintf(buffer,sizeof(buffer),"%s %s",mouse.c_str(),nGetInstance()->GetInput()->GetMouse()->GetButtonName(nMouse::ButtonRight).c_str());

		nGetInstance()->GetGraphics()->GetTextRect(nGetInstance()->GetGraphics()->GetBoldFont(),buffer,&rect,NULL);
		nGetInstance()->GetGraphics()->DrawPrintLine(nGetInstance()->GetGraphics()->GetBoldFont(),nRect(nGetInstance()->GetGraphics()->GetDisplaySize().cx / 2 + 10,y,0,0),buffer,100.0f * (nGetInstance()->GetAbsoluteTime() - m_PauseTime),DT_NOCLIP,nColor(0.5f,COLOR_TEXT));

		y += rect.GetHeight();
	}
}