• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Results 1 to 7 of 7

    Thread: D3D9 Draw Text

    1. #1
      Jr.Coder
      Learning to hack games!
       
      Piratey
       
      Clarityworld's Avatar
      Join Date
      Feb 2015
      Posts
      61
      Thanks (-->)
      22
      Thanks (<--)
      3

      D3D9 Draw Text

      Advertise on GuidedHacking
      Hey guys.


      I would like to start by drawing text over a game. like "Hello world!"in the top left of the screen. Also would like to use it in my current project which is external.

      Can anyone recommend some good and thorough tutorials on programming some Direct X 9 stuff (in c++) ?

      Thanks guys!
      Donate  

    2. #2
      EXTERMINATE
      s5
       
      Hacking
       
      keto's Avatar
      Join Date
      May 2013
      Location
      Scotland
      Posts
      157
      Thanks (-->)
      310
      Thanks (<--)
      63
      I actually found this series. Sadly the guy who made it seems to be a bit slow while talking, but it should be okay to get the hang of it. If somebody can find something better, please let us know!

    3. #3
      Jr.Coder
      Learning to hack games!
       
      Piratey
       
      Clarityworld's Avatar
      Join Date
      Feb 2015
      Posts
      61
      Thanks (-->)
      22
      Thanks (<--)
      3
      Quote Originally Posted by Nespahr View Post
      I actually found this series. Sadly the guy who made it seems to be a bit slow while talking, but it should be okay to get the hang of it. If somebody can find something better, please let us know!
      Well thanks for the hint but it's not really the thing what i'm looking for.
      Ty anyway

    4. #4
      Respected Hacker
      Learning to hack games!
       
      Coding
       
      till0sch's Avatar
      Join Date
      Oct 2012
      Location
      Germany.
      Posts
      1,168
      Thanks (-->)
      179
      Thanks (<--)
      340
      Code:
      void Draw_Text(LPCSTR TextToDraw, D3DCOLOR color)
      {
      	dx_Font->DrawTextA(NULL, TextToDraw, strlen(TextToDraw), &pos, DT_NOCLIP, color);
      }
      dx_Font is of type ID3DXFont*

      and you need to call

      Code:
      void ReFont(LPDIRECT3DDEVICE9 pDevice)
      {
          if (dx_Font != 0)
      	{
      		dx_Font->Release();
      	}
          
      	dx_Font = 0;
          D3DXCreateFontA(pDevice, 16, 6, FW_BOLD, 0, 0, DEFAULT_CHARSET, OUT_TT_ONLY_PRECIS, PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &dx_Font );
      }
      from your endscene for it to be created new all the time. Hope this helps.. Obviously requires endscene hook.

    5. #5
      Kim Kong Trasher
      I don't have status.
       
      Raging
       
      c5's Avatar
      Join Date
      Jul 2012
      Location
      Mankei Iland
      Posts
      1,221
      Thanks (-->)
      97
      Thanks (<--)
      492
      Quote Originally Posted by till0sch97 View Post
      and you need to call

      Code:
      void ReFont(LPDIRECT3DDEVICE9 pDevice)
      {
          if (dx_Font != 0)
      	{
      		dx_Font->Release();
      	}
          
      	dx_Font = 0;
          D3DXCreateFontA(pDevice, 16, 6, FW_BOLD, 0, 0, DEFAULT_CHARSET, OUT_TT_ONLY_PRECIS, PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &dx_Font );
      }
      from your endscene for it to be created new all the time. Hope this helps.. Obviously requires endscene hook.
      Why would you recreate font all the time? Just handle device loss in Reset hook accordingly.
      D3D9 Draw Text

    6. #6
      Respected Hacker
      Learning to hack games!
       
      Coding
       
      till0sch's Avatar
      Join Date
      Oct 2012
      Location
      Germany.
      Posts
      1,168
      Thanks (-->)
      179
      Thanks (<--)
      340
      I forgot to mention that the font was static..

    7. #7
      Kim Kong Trasher
      I don't have status.
       
      Raging
       
      c5's Avatar
      Join Date
      Jul 2012
      Location
      Mankei Iland
      Posts
      1,221
      Thanks (-->)
      97
      Thanks (<--)
      492
      Advertise on GuidedHacking
      Quote Originally Posted by till0sch97 View Post
      I forgot to mention that the font was static..
      That does not have to do anything with reinitializing the font every frame

    8. Thanks GAFO666 thanked for this post

    Similar Game Hacker Threads

    1. [Help] Draw D3D Box
      By zoratz in forum Hacking Help
      Replies: 5
      Last Post: 04-26-2016, 12:53 PM
    2. [Help] DirectX Text draw
      By traderain in forum Hacking Help
      Replies: 4
      Last Post: 02-21-2016, 12:26 PM
    3. [Help] Draw box, text
      By dromenox in forum Assault Cube Hacks
      Replies: 11
      Last Post: 08-25-2015, 11:53 AM
    4. How to draw D3D text on game
      By hack_disgame in forum Hacking Help
      Replies: 1
      Last Post: 08-16-2015, 09:48 AM
    5. Replies: 3
      Last Post: 10-22-2013, 03:05 PM

    Tags for this Thread