void COptions::Render()
{
	CSGD_TextureManager *pTM = CSGD_TextureManager::GetInstance();

	static RECT rBarRect = { 0,0,200,64 };

	rBarRect.right = 200;
	pTM->Draw(m_nImageID[1],0,0,3.5f,8.0f,&rBarRect,0,0,0,D3DCOLOR_XRGB(255,255,255));

	m_Font.DrawString("Options", 200, 0);
	m_Font.DrawString("Music Volume", 125, 75);
	m_Font.DrawString("SFX Volume", 125, 200);
	m_Font.DrawString("Difficulty",125,325);
	m_Font.DrawString("Back",125,450);

	static RECT rCursorRect = {103,116,131,132};

	rBarRect.right = m_nMusicVolume * 2;

	pTM->Draw(m_nImageID[0],75,m_nCursorPosition,1.5f,1.5f,&rCursorRect,0,0,0,D3DCOLOR_XRGB(255,255,255));	
	pTM->Draw(m_nImageID[1], 125,115,2.0f,1,&rBarRect,0,0,0,D3DCOLOR_XRGB(0,0,255));

	rBarRect.right = m_nSFXVolume * 2;
	pTM->Draw(m_nImageID[1], 125,240,2.0f,1,&rBarRect,0,0,0,D3DCOLOR_XRGB(0,0,255));

	if (m_nDifficulty == DIFFICULTY_MEDIUM)
		m_Font.DrawString("Medium",175,375);
	else if (m_nDifficulty == DIFFICULTY_EASY)
		m_Font.DrawString("Easy",175,375);
	else if (m_nDifficulty == DIFFICULTY_HARD)
		m_Font.DrawString("Hard",175,375);


}
void CEnemyDemon::Render(void)
{
    CSGD_TextureManager *pTM = CSGD_TextureManager::GetInstance();

    if(GetHP() > 0)
    {
        if (GetXFlip() == 1)
            pTM->Draw(GetImageID(),GetCollisionRect().left, GetCollisionRect().top, GetXFlip() * 1.5f,1.5f,&rEnemyRect,GetWidth() / 2, GetHeight() /2,0.0f,D3DCOLOR_XRGB(255,255,255));
        else if (GetXFlip() == -1)
            pTM->Draw(GetImageID(),GetCollisionRect().right, GetCollisionRect().top, GetXFlip() * 1.5f,1.5f,&rEnemyRect,GetWidth() / 2, GetHeight() /2,0.0f,D3DCOLOR_XRGB(255,255,255));
        //	pTM->Draw(GetImageID(),GetPosX() - GetWidth()/4, GetPosY() - GetHeight()/4, GetXFlip() * 1.5f,1.5f,&rEnemyRect,GetWidth() / 2, GetHeight() /2,0.0f,D3DCOLOR_XRGB(255,255,255));
    }
}
void CEnemy::Render(void)
{
	CSGD_TextureManager *pTM = CSGD_TextureManager::GetInstance();

	if(GetHP() > 0)
		pTM->Draw(GetImageID(),GetPosX(),GetPosY(),1,1,NULL,GetWidth() / 2, GetHeight() /2,3.14f,D3DCOLOR_XRGB(255,255,255));
}
void CBitmapFont::DrawString(const char* szText, int nPosX, int nPosY)
{
	CSGD_TextureManager* pTM = CSGD_TextureManager::GetInstance();

	//	iterate through the string 1 character at a time
	int length = (int)strlen(szText);

	for (int i=0; i < length; i++)
	{
		//	get ascii value of character
		char ch = szText[i];

		//	make sure character is uppercase
		ch = toupper(ch);

		//	calculate the id on the bitmap using the start char
		int id = ch - GetStartChar();

		//	Make a rect based on an ID
		RECT rLetter = CalculateRect(id);

		//	Draw it to the screen
		pTM->Draw(GetFontImageID(), nPosX + (i*GetCharWidth()), nPosY, 1.0f, 1.0f, &rLetter);
	}
}
void CBasePlayer::Render(void)
{
	CSGD_TextureManager * pTM = CSGD_TextureManager::GetInstance();
	

	pTM->Draw( m_nGeneralImageID, (int)m_fPosX, (int)m_fPosY, 0.15f, 0.15f );
}
void CEnemyBusiness::Render(void)
{
	CSGD_TextureManager *pTM = CSGD_TextureManager::GetInstance();
	CSGD_Direct3D *p3D = CSGD_Direct3D::GetInstance();
	CSGD_MessageSystem *pMS = CSGD_MessageSystem::GetInstance();

	RECT r = GetCollisionRect();

	if(GetHP() > 0)
	{
		if (GetXFlip() == 1)
			pTM->Draw(GetImageID(),GetCollisionRect().left + m_nOffset, GetCollisionRect().top, GetXFlip() * 1.5f,1.5f,&rEnemyRect,GetWidth() / 2, GetHeight() /2,0.0f,D3DCOLOR_XRGB(255,255,255));
		else if (GetXFlip() == -1)
			pTM->Draw(GetImageID(),GetCollisionRect().right - m_nOffset, GetCollisionRect().top, GetXFlip() * 1.5f,1.5f,&rEnemyRect,GetWidth() / 2, GetHeight() /2,0.0f,D3DCOLOR_XRGB(255,255,255));
	}

}
void	CInstructions::Render2( )
{
	CSGD_TextureManager * pTM = CSGD_TextureManager::GetInstance();
	CBitmapFont* pFont = CGame::GetInstance()->GetFont();
	CSGD_Direct3D* pD = CSGD_Direct3D::GetInstance();

	pFont->Draw( _T("Arcade  Controls:"), 300, 100, 1.0f, D3DCOLOR_ARGB(255, 255, 255, 255) );


	pTM->Draw(m_nArcade,150,200,0.5f,0.5f);


	pFont->Draw( _T("<-  Previous  Page"), 100, 500, 0.75f, D3DCOLOR_ARGB(255, 255, 255, 255) );

	pFont->Draw( _T("ESC  to  return  to  Previous  Menu"), 250, 500, 0.75f, D3DCOLOR_ARGB(255, 255, 255, 255) );

	//pFont->Draw( _T("Next  Page  ->"), 600, 500, 0.75f, D3DCOLOR_ARGB(255, 255, 255, 255) );
}
Beispiel #8
0
void	CLoseGame::Render			( )			
{
	
	CSGD_TextureManager * pTM = CSGD_TextureManager::GetInstance();
	CBitmapFont* pFont = CGame::GetInstance()->GetFont();

	pTM->Draw( m_nBackgroundImageID, 0, 0, 1.5f, 1.5f );
	
	pFont->Draw( _T("Archaic Domination"), (int)((640 - (10*32*0.85f)) / 2), 20, 2.0f, D3DCOLOR_ARGB(255, 0, 0, 255) );


	//Developers
	pFont->Draw( _T("Player Two Wins!"), (640 - (11*32)) / 2, 100, 1.5f, D3DCOLOR_ARGB(255, 255, 0, 0) );

	

	

}
void	CInstructions::Render			( )			
{
	CSGD_TextureManager * pTM = CSGD_TextureManager::GetInstance();


	pTM->Draw( m_nBackgroundID, 0, 0, 1.0f, 1.0f );

	CBitmapFont* pFont = CGame::GetInstance()->GetFont();

	RECT box = {50,50,750,550};
	CSGD_Direct3D::GetInstance()->DrawRect(box,D3DCOLOR_XRGB(0,0,0));



	//Render Pages
	switch(m_nCPos)
	{
	case 0:
		Render0();
		break;
	case 1:
		Render1();
		break;
	case 2:
		Render2();
		break;
	case 3:
		Render3();
		break;
	case 4:
		break;
	case 5:
		break;
	case 6:
		break;
	}





}
void CBase::Render(void)
{
	CSGD_TextureManager* pTM = CSGD_TextureManager::GetInstance();

	pTM->Draw( GetImageID(), GetPosX() - m_nWidth/2, GetPosY() - m_nHeight/2, 
		1.0f, 1.0f, NULL, 0.0f, 0.0f, 0.0f, D3DCOLOR_ARGB(128, 255, 255, 255));

	CSGD_Direct3D* pD3D = CSGD_Direct3D::GetInstance();

	tVector2D tVisualize;
	tVisualize.fX = GetVelX();
	tVisualize.fY = GetVelY();

	tVisualize = Vector2DNormalize(tVisualize);
	tVisualize.fX *= 32.0f;
	tVisualize.fY *= 32.0f;

	pD3D->DrawLine(GetPosX(), GetPosY(), GetPosX() + tVisualize.fX, GetPosY() + tVisualize.fY,
						255, 0, 0);
}
void	CInstructions::Render3( )
{
	CSGD_TextureManager * pTM = CSGD_TextureManager::GetInstance();
	CBitmapFont* pFont = CGame::GetInstance()->GetFont();
	CSGD_Direct3D* pD = CSGD_Direct3D::GetInstance();


	pFont->Draw( _T("INSTRUCTIONS:"), 300, 100, 1.0f, D3DCOLOR_ARGB(255, 255, 255, 255) );



	pFont->Draw( _T("Archaic  Domination  is  a  turn-based  strategy  game.  Move  your  armies  across  the\n continent  to  claim  ownership  of  every  territory.\n\nControl  the  kingdom  of  Humans  and  rid  the  land  of  the  Undead  in  Campaign  Mode.\n\nGo  head  to  head  against  a  friend  in  Versus  Mode  as  either  Human  or  Undead"), 100, 150, 0.75f, D3DCOLOR_ARGB(255, 255, 255, 255) );

	pFont->Draw( _T("Over  World:"), 300, 100, 1.0f, D3DCOLOR_ARGB(255, 255, 255, 255) );

	pTM->Draw(m_nTurn,100,175,0.75f,0.75f);


	pFont->Draw( _T("<-  Previous  Page"), 100, 500, 0.75f, D3DCOLOR_ARGB(255, 255, 255, 255) );

	pFont->Draw( _T("ESC  to  return  to  Previous  Menu"), 250, 500, 0.75f, D3DCOLOR_ARGB(255, 255, 255, 255) );

	pFont->Draw( _T("Next  Page  ->"), 600, 500, 0.75f, D3DCOLOR_ARGB(255, 255, 255, 255) );
}
Beispiel #12
0
void GameInfo::Display( int x, int y )
{
    CSGD_Direct3D* pD3D = CSGD_Direct3D::GetInstance();
    FontManager* pFont = CGame::GetInstance()->GetFont();
    CSGD_TextureManager* pTM = CSGD_TextureManager::GetInstance();

    pTM->Draw( m_nMenuArtid, x, y);

    TOSTRINGSTREAM wss;

    wss.str(L"");
    wss << "Stage 0" << m_nLevel;
    pFont->Draw( CHINESE_TAKEAWAY , wss.str().c_str(), x + 43, y+36, 0.5f,0.5f);

    wss.str(L"");
    wss << "EXP: " << m_nExpPts;
    pFont->Draw( CHINESE_TAKEAWAY , wss.str().c_str(), x + 201, y+36, 0.5f,0.5f);


    wss.str(L"");
    wss << m_nFireSpl;
    pFont->Draw( CHINESE_TAKEAWAY ,  wss.str().c_str(), x + 83, y + 78, 0.5f,0.5f);

    wss.str(L"");
    wss << m_nWindSpl;
    pFont->Draw( CHINESE_TAKEAWAY ,  wss.str().c_str(), x + 160, y + 78, 0.5f,0.5f);

    wss.str(L"");
    wss << m_nIceSpl;
    pFont->Draw( CHINESE_TAKEAWAY ,  wss.str().c_str(), x + 237, y + 78, 0.5f,0.5f);

    wss.str(L"");
    wss << m_nEarthSpl;
    pFont->Draw( CHINESE_TAKEAWAY ,  wss.str().c_str(), x + 304, y + 78,0.5f,0.5f);

}
Beispiel #13
0
void	CMainMenu::Render			( )			
{
	CSGD_TextureManager * pTM = CSGD_TextureManager::GetInstance();
	

	pTM->Draw( m_nBackgroundID, 0, 0, 1.0f, 1.0f );

	CBitmapFont* pFont = CGame::GetInstance()->GetFont();

	//Render the title
	pFont->Draw( _T("Archaic Domination"), 
		(int)((640 - (5*32*2.0f)) / 2), 
		70, 2.0f, D3DCOLOR_ARGB(255, 0, 0, 255) );
	

	//Render the 
	if(m_nCursor == 0)
		pTM->Draw(SelectedButtonID,(640 - (15*32)) / 2, 164, 1.0f, 0.7f);
	else
		pTM->Draw(nonSelectedButtonID,(640 - (15*32)) / 2, 164, 1.0f, 0.7f);
	pFont->Draw( _T("Campaign"), (640 - (10*32)) / 2, 180, 1.0f, D3DCOLOR_ARGB(255, 0, 0, 255) );

	if(m_nCursor == 1)
		pTM->Draw(SelectedButtonID,(640 - (15*32)) / 2, 214, 1.0f, 0.7f);
	else
		pTM->Draw(nonSelectedButtonID,(640 - (15*32)) / 2, 214, 1.0f, 0.7f);
	pFont->Draw( _T("Versus"), (640 - (10*32)) / 2, 230, 1.0f, D3DCOLOR_ARGB(255, 0, 0, 255) );

	if(m_nCursor == 2)
		pTM->Draw(SelectedButtonID,(640 - (15*32)) / 2, 264, 1.0f, 0.7f);
	else
		pTM->Draw(nonSelectedButtonID,(640 - (15*32)) / 2, 264, 1.0f, 0.7f);
	pFont->Draw( _T("Quick Match"), (640 - (10*32)) / 2, 280, 1.0f, D3DCOLOR_ARGB(255, 0, 0, 255) );

	if(m_nCursor == 3)
		pTM->Draw(SelectedButtonID,(640 - (15*32)) / 2, 314, 1.0f, 0.7f);
	else
		pTM->Draw(nonSelectedButtonID,(640 - (15*32)) / 2, 314, 1.0f, 0.7f);
	pFont->Draw( _T("Load"), (640 - (10*32)) / 2, 330, 1.0f, D3DCOLOR_ARGB(255, 0, 0, 255) );

	if(m_nCursor == 4)
		pTM->Draw(SelectedButtonID,(640 - (15*32)) / 2, 364, 1.0f, 0.7f);
	else
		pTM->Draw(nonSelectedButtonID,(640 - (15*32)) / 2, 364, 1.0f, 0.7f);
	pFont->Draw( _T("Instructions"), (640 - (10*32)) / 2, 380, 1.0f, D3DCOLOR_ARGB(255, 0, 0, 255) );

	if(m_nCursor == 5)
		pTM->Draw(SelectedButtonID,(640 - (15*32)) / 2, 414, 1.0f, 0.7f);
	else
		pTM->Draw(nonSelectedButtonID,(640 - (15*32)) / 2, 414, 1.0f, 0.7f);
	pFont->Draw( _T("Credits"), (640 - (10*32)) / 2, 430, 1.0f, D3DCOLOR_ARGB(255, 0, 0, 255) );

	if(m_nCursor == 6)
		pTM->Draw(SelectedButtonID,(640 - (15*32)) / 2, 464, 1.0f, 0.7f);
	else
		pTM->Draw(nonSelectedButtonID,(640 - (15*32)) / 2, 464, 1.0f, 0.7f);
	pFont->Draw( _T("Options"), (640 - (10*32)) / 2, 480, 1.0f, D3DCOLOR_ARGB(255, 0, 0, 255) );

	if(m_nCursor == 7)
		pTM->Draw(SelectedButtonID,(640 - (15*32)) / 2, 514, 1.0f, 0.7f);
	else
		pTM->Draw(nonSelectedButtonID,(640 - (15*32)) / 2, 514, 1.0f, 0.7f);;
	pFont->Draw( _T("Exit"), (640 - (10*32)) / 2, 530, 1.0f, D3DCOLOR_ARGB(255, 0, 0, 255) );
	

	//Render Cursor Position
	//pTM->Draw(cursorImageID, (640 - (12*32)) / 2 , 200 + (m_nCursor *50), 0.3f, 0.3f, nullptr, 35.0f / 2, 72.0f / 2, D3DX_PI / -2);
}
void CPowerupRapidFire::Render(void)
{
	CSGD_TextureManager *pTM = CSGD_TextureManager::GetInstance();
	pTM->Draw(GetImageID(),GetCollisionRect().left,GetCollisionRect().top,1.5f,1.5f,&rPowerupRect,GetWidth() / 2, GetHeight() /2,0,D3DCOLOR_XRGB(255,255,255));
}
void CBulletHook::Render(void)
{
	static RECT r = {525,728, 553, 769};
	CSGD_TextureManager *pTM = CSGD_TextureManager::GetInstance();
	pTM->Draw(GetImageID(),GetCollisionRect().left,GetCollisionRect().top + 32,1.5f,1.5f,&r,GetWidth() / 2, GetHeight() /2,GetRotation(),D3DCOLOR_XRGB(255,255,255));
}
void CBulletPaper::Render(void)
{
	static RECT r = {615,32,624,42};
	CSGD_TextureManager *pTM = CSGD_TextureManager::GetInstance();
	pTM->Draw(GetImageID(),GetPosX(),GetPosY(),2.0f,2.0f,&r,GetWidth() / 2, GetHeight() /2,GetRotation(),D3DCOLOR_XRGB(255,255,255));
}
void CGameOverState::Render(void)
{
	CSGD_TextureManager* pTM = CSGD_TextureManager::GetInstance();
	CGraphicsManager* pGM = CGraphicsManager::GetInstance();

	ostringstream temp;
	if(AI)
	{
		temp << StringTable::GetInstance()->GetString("Defeated");
		//PUT_SOUND_HERE("AIwins")
	}
	else
	{
		temp << StringTable::GetInstance()->GetString("Player ") << " "<< Player<<StringTable::GetInstance()->GetString("  Wins!");
		//PUT_SOUND_HERE("GenericWin")
	}

	pTM->Draw(pGM->GetID(_T("scrollvert")), 20, -20, 1.5f, 1.2f);


	tempfont.Print(temp.str().c_str(),275,85,.6f,D3DXCOLOR(255,255,255,255));
	tempfont.Print(StringTable::GetInstance()->GetString("Press cancel to return...").c_str(), 100, 520, .4f, D3DCOLOR_ARGB(255, 255, 255, 255));

	if( m_nPage == 0 )
		tempfont.Print("Created", 325, 160, .6f, D3DCOLOR_ARGB(255, 255, 255, 255));
	else if( m_nPage == 1 )
		tempfont.Print("Damage", 325, 160, .6f, D3DCOLOR_ARGB(255, 255, 255, 255));
	else if( m_nPage == 2 )
		tempfont.Print("Killed", 350, 160, .6f, D3DCOLOR_ARGB(255, 255, 255, 255));
	else if( m_nPage == 3 )
		tempfont.Print("Champion", 310, 160, .6f, D3DCOLOR_ARGB(255, 255, 255, 255));
	else
		tempfont.Print("Player", 325, 160, .6f, D3DCOLOR_ARGB(255, 255, 255, 255));

	tempfont.Print("Player 1", 190, 220, .6f, D3DCOLOR_ARGB(255, 255, 255, 255));
	tempfont.Print("Player 2", 465, 220, .6f, D3DCOLOR_ARGB(255, 255, 255, 255));

	ostringstream oss;
	int p1Archer = 0, p2Archer = 0, p1Calv = 0, p2Calv = 0, p1Sword = 0, p2Sword = 0;
	// player 1
	CPlayer* player = CGameManager::GetInstance()->GetPlayer(0);
	CPlayer* player2 = CGameManager::GetInstance()->GetPlayer(1);
	if( m_nPage == 0 )
	{
		p1Archer = player->GetStats()->nArcherCreated;
		p1Calv = player->GetStats()->nCalvaryCreated;
		p1Sword = player->GetStats()->nSwordsmanCreated;
	}
	else if( m_nPage == 1 )
	{
		p1Archer = player->GetStats()->nArcherDamageDone;
		p1Calv = player->GetStats()->nCalvaryDamageDone;
		p1Sword = player->GetStats()->nSwordsmanDamageDone;
	}
	else if( m_nPage == 2 )
	{
		p1Archer = player->GetStats()->nArcherKilled;
		p1Calv = player->GetStats()->nCavalryKilled;
		p1Sword = player->GetStats()->nSwordsmanKilled;
	}
	// player 2
	if( m_nPage == 0 )
	{
		p2Archer = player2->GetStats()->nArcherCreated;
		p2Calv = player2->GetStats()->nCalvaryCreated;
		p2Sword = player2->GetStats()->nSwordsmanCreated;
	}
	else if( m_nPage == 1 )
	{
		p2Archer = player2->GetStats()->nArcherDamageDone;
		p2Calv = player2->GetStats()->nCalvaryDamageDone;
		p2Sword = player2->GetStats()->nSwordsmanDamageDone;
	}
	else if( m_nPage == 2 )
	{
		p2Archer = player2->GetStats()->nArcherKilled;
		p2Calv = player2->GetStats()->nCavalryKilled;
		p2Sword = player2->GetStats()->nSwordsmanKilled;
	}

	if( m_nPage < 3 )
	{
		// player 1
		// archer
		oss << p1Archer;
		tempfont.Print(oss.str().c_str(),245,285,.6f,D3DXCOLOR(255,255,255,255));
		oss.str("");
		// swordsman
		oss << p1Sword;
		tempfont.Print(oss.str().c_str(),245,345,.6f,D3DXCOLOR(255,255,255,255));
		oss.str("");
		// cavalry
		oss << p1Calv;
		tempfont.Print(oss.str().c_str(),245,405,.6f,D3DXCOLOR(255,255,255,255));
		oss.str("");

		// player 2
		// archer
		oss << p2Archer;
		tempfont.Print(oss.str().c_str(),525,285,.6f,D3DXCOLOR(255,255,255,255));
		oss.str("");
		// swordsman
		oss << p2Sword;
		tempfont.Print(oss.str().c_str(),525,345,.6f,D3DXCOLOR(255,255,255,255));
		oss.str("");
		// cavalry
		oss << p2Calv;
		tempfont.Print(oss.str().c_str(),525,405,.6f,D3DXCOLOR(255,255,255,255));
		oss.str("");

		pTM->Draw(pGM->GetID(_T("archerportrait")), 375, 275, .8f, .8f);
		pTM->Draw(pGM->GetID(_T("swordsmanportrait")), 375, 335, .8f, .8f);
		pTM->Draw(pGM->GetID(_T("cavalryportrait")), 375, 395, .8f, .8f);
	}
	else if( m_nPage == 3 )
	{
		oss << "AP";
		tempfont.Print(oss.str().c_str(), 380, 275, .6f, D3DCOLOR_ARGB(255, 255, 255, 255));
		oss.str("");

		pTM->Draw(pGM->GetID(_T("damage")), 375, 325, .8f, .8f);
		pTM->Draw(pGM->GetID(_T("healicon")), 375, 400, .8f, .8f);
		// player 1
		// ap
		oss << player->GetStats()->nPlayerAPSpent;
		tempfont.Print(oss.str().c_str(), 245, 275, .6f, D3DCOLOR_ARGB(255, 255, 255, 255));
		oss.str("");
		// damage
		oss << player->GetStats()->nChampionDamageDone;
		tempfont.Print(oss.str().c_str(), 245, 340, .6f, D3DCOLOR_ARGB(255, 255, 255, 255));
		oss.str("");
		// healing
		oss << player->GetStats()->nChampionHealingDone;
		tempfont.Print(oss.str().c_str(), 245, 410, .6f, D3DCOLOR_ARGB(255, 255, 255, 255));
		oss.str("");
		// player 2
		// ap
		oss << player2->GetStats()->nPlayerAPSpent;
		tempfont.Print(oss.str().c_str(), 525, 275, .6f, D3DCOLOR_ARGB(255, 255, 255, 255));
		oss.str("");
		// damage
		oss << player2->GetStats()->nChampionDamageDone;
		tempfont.Print(oss.str().c_str(), 525, 340, .6f, D3DCOLOR_ARGB(255, 255, 255, 255));
		oss.str("");
		// healing
		oss << player2->GetStats()->nChampionHealingDone;
		tempfont.Print(oss.str().c_str(), 525, 410, .6f, D3DCOLOR_ARGB(255, 255, 255, 255));
		oss.str("");
	}
	else
	{
		oss << StringTable::GetInstance()->GetString("  Wood ");
		tempfont.Print(oss.str().c_str(), 350, 275, .6f, D3DCOLOR_ARGB(255, 255, 255, 255));
		oss.str("");

		oss << StringTable::GetInstance()->GetString("  Metal ");
		tempfont.Print(oss.str().c_str(), 350, 325, .6f, D3DCOLOR_ARGB(255, 255, 255, 255));
		oss.str("");

		oss << "EXP";
		tempfont.Print(oss.str().c_str(), 360, 385, .6f, D3DCOLOR_ARGB(255, 255, 255, 255));
		oss.str("");

		// player2
		// wood
		oss << player2->GetStats()->nPlayerWoodEarned;
		tempfont.Print(oss.str().c_str(), 525, 275, .6f, D3DCOLOR_ARGB(255, 255, 255, 255));
		oss.str("");
		// metal
		oss << player2->GetStats()->nPlayerMetalEarned;
		tempfont.Print(oss.str().c_str(), 525, 325, .6f, D3DCOLOR_ARGB(255, 255, 255, 255));
		oss.str("");
		// exp
		oss << player2->GetStats()->nPlayerEXPEarned;
		tempfont.Print(oss.str().c_str(), 525, 385, .6f, D3DCOLOR_ARGB(255, 255, 255, 255));
		oss.str("");

		// player1
		// wood
		oss << player->GetStats()->nPlayerWoodEarned;
		tempfont.Print(oss.str().c_str(), 245, 275, .6f, D3DCOLOR_ARGB(255, 255, 255, 255));
		oss.str("");
		// metal
		oss << player->GetStats()->nPlayerMetalEarned;
		tempfont.Print(oss.str().c_str(), 245, 325, .6f, D3DCOLOR_ARGB(255, 255, 255, 255));
		oss.str("");
		// exp
		oss << player->GetStats()->nPlayerEXPEarned;
		tempfont.Print(oss.str().c_str(), 245, 385, .6f, D3DCOLOR_ARGB(255, 255, 255, 255));
		oss.str("");
	}
	
}
void CGamePlay::Render()
{
	CSGD_TextureManager *pTM = CSGD_TextureManager::GetInstance();
	CPlayerCharacter *pPC = CPlayerCharacter::GetInstance();
	CSGD_Direct3D *p3D = CSGD_Direct3D::GetInstance();

	static RECT rHealthRect = {50,115,89,131 };
	static RECT rMugshotRect = {14,107,35,135 };

	RECT rForegroundRect;
	RECT rBackgroundRect;

	if (GetLevel() == 1)
	{

		rForegroundRect.left = 0;
		rForegroundRect.top = 390;
		rForegroundRect.right = 745;
		rForegroundRect.bottom = 447;
		rBackgroundRect.left = 0;
		rBackgroundRect.top = 450;
		rBackgroundRect.right = 380;
		rBackgroundRect.bottom = 671;
		pTM->Draw(m_nBGID,0 + m_nSpaceOffset,0,2.5f,3.0f,&rBackgroundRect,0,0,0,D3DCOLOR_XRGB(255,255,255));
		pTM->Draw(m_nBGID,0 + m_nBridgeOffset,256,1,1,&rForegroundRect,0,0,0,D3DCOLOR_XRGB(255,255,255));
	}
	else if (GetLevel() == 2)
	{
		rForegroundRect.left = 41;
		rForegroundRect.top = 351;
		rForegroundRect.right = 392;
		rForegroundRect.bottom = 590;
		rBackgroundRect.left = 3;
		rBackgroundRect.top = 594;
		rBackgroundRect.right = 387;
		rBackgroundRect.bottom = 815;
		pTM->Draw(m_nImageID[2],0 + m_nSpaceOffset,0,2.5f,2.5f,&rBackgroundRect,0,0,0,D3DCOLOR_XRGB(255,255,255));
		pTM->Draw(m_nImageID[2],0 + m_nBridgeOffset,100,2.25f,1.75f,&rForegroundRect,0,0,0,D3DCOLOR_XRGB(255,255,255));
	}
	else if (GetLevel() == 3)
	{
		rForegroundRect.left = 536;
		rForegroundRect.top = 380;
		rForegroundRect.right = 894;
		rForegroundRect.bottom = 445;
		rBackgroundRect.left = 1418;
		rBackgroundRect.top = 4;
		rBackgroundRect.right = 1929;
		rBackgroundRect.bottom = 259;
		pTM->Draw(m_nImageID[4],0 + m_nSpaceOffset,0,2.5f,2.5f,&rBackgroundRect,0,0,0,D3DCOLOR_XRGB(255,255,255));
		pTM->Draw(m_nImageID[4],0 + m_nBridgeOffset,m_nBridgeOffsetY,2.25f,1.75f,&rForegroundRect,0,0,0,D3DCOLOR_XRGB(255,255,255));
	}

	pTM->Draw(m_nImageID[3],10,0,2.5f * CPlayerCharacter::GetInstance()->GetHP()/100,2.0f,&rHealthRect,0,0,0,D3DCOLOR_XRGB(255,255,255));
	pTM->Draw(m_nImageID[3],560,0,1.5f,1.5f,&rMugshotRect,0,0,0,D3DCOLOR_XRGB(255,255,255));

	m_Font.DrawString("x",592,0);
	char buffer[128];
	sprintf_s(buffer, _countof(buffer), "%d", CGame::GetInstance()->GetLives());
	m_Font2.DrawString(buffer,608,0);
	sprintf_s(buffer, _countof(buffer),"%d",CGame::GetInstance()->GetScore());
	m_Font2.DrawString(buffer,275,0);
	m_Font.DrawString("Enemies:",475,464);
	sprintf_s(buffer, _countof(buffer),"%d",GetRemainingEnemies());
	m_Font.DrawString(buffer,600,464);
	sprintf_s(buffer,_countof(buffer),"%d",pPC->GetHP());
	m_Font.DrawString(buffer,0,30);

	if (CGame::GetInstance()->GetPaused() == true)
		m_Font.DrawString("Paused",300,200);

}