Code:
void DrawPVEBracketBox ( LPDIRECT3DDEVICE9 pDevice, CPlayer* pPlayer, D3DCOLOR Color )
{
// Cabeça do boneco;
D3DXVECTOR3 pHead = GetBonePosition ( pPlayer->Object, M_BONE_HEAD );
// Pé do boneco;
D3DXVECTOR3 pLFoot = GetBonePosition ( pPlayer->Object, M_BONE_L_FOOT );
D3DXVECTOR3 pRFoot = GetBonePosition ( pPlayer->Object, M_BONE_R_FOOT );
if ( WorldToScreens ( pDevice, &pHead ) && WorldToScreens ( pDevice, &pLFoot ) && WorldToScreens ( pDevice, &pRFoot ) )
{
// Calcular tamanho;
D3DXVECTOR3 pBox = pHead - pRFoot;
if ( pBox.y < 0 )
pBox.y *= -1;
int pBoxHidg = ( int ) pBox.y / 2;
int pDrawX = ( int ) pHead.x - ( pBoxHidg / 2 );
int pDrawX2 = ( int ) pHead.x + ( pBoxHidg / 2 );
FillRGB ( pDrawX, pHead.y - 0, 10, 1, Color, pDevice );
FillRGB ( pDrawX, pHead.y - 0, 1, 10, Color, pDevice );
FillRGB ( pDrawX, pLFoot.y - 10, 1, 10, Color, pDevice );
FillRGB ( pDrawX, pLFoot.y - 0, 10, 1, Color, pDevice );
FillRGB ( pDrawX2, pHead.y - 0, 10, 1, Color, pDevice );
FillRGB ( pDrawX2 + 10, pHead.y - 0, 1, 10, Color, pDevice );
FillRGB ( pDrawX2 + 10, pLFoot.y - 10, 1, 10, Color, pDevice );
FillRGB ( pDrawX2 - 0, pLFoot.y - 0, 10, 1, Color, pDevice );
}
}