Advertisement
Guest User

Untitled

a guest
Jan 26th, 2015
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. void DrawString(int x, int y, D3DCOLOR dwColour, DWORD Flag, LPD3DXFONT Font, const char* text, ...)
  2. {
  3. D3DCOLOR colour = dwColour;
  4.  
  5. RECT rct;
  6. rct.left = x - 1;
  7. rct.right = x + 1;
  8. rct.top = y - 1;
  9. rct.bottom = y + 1;
  10.  
  11. va_list va_alist;
  12. char logbuf[256] = { 0 };
  13. va_start(va_alist, text);
  14. _vsnprintf(logbuf + strlen(logbuf), sizeof(logbuf)-strlen(logbuf), text, va_alist);
  15. va_end(va_alist);
  16.  
  17. textSprite->Begin(D3DXSPRITE_ALPHABLEND);
  18. Font->DrawText(textSprite, logbuf, -1, &rct, Flag | DT_NOCLIP, colour);
  19. textSprite->End();
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement