Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #define COL_GREEN D3DCOLOR_ARGB(255,0,252,124)
  2.  
  3. void DrawHealthBar(int x, int y, float health, int w, int h, D3DCOLOR Draw, D3DCOLOR out)
  4. {
  5. x -= w / 2;
  6. y -= h / 2;
  7. Renderer::GetInstance()->DrawBox(x - 1, y - 1, w + 4, h + 2, COL_BLACK, out);
  8. Renderer::GetInstance()->DrawBox(x, y, w + 2, h, out, COL_BLACK);
  9. UINT hw = (UINT)(((w)* health) / 100);
  10. Renderer::GetInstance()->DrawBox(x + 1, y + 1, hw, h - 2, Draw, Draw);
  11.  
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement