Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding > Coding Tutorials
You last visited: Today at 03:23

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



cSilentFont v1.0 (silentchris LPD3DXFONT class)

Discussion on cSilentFont v1.0 (silentchris LPD3DXFONT class) within the Coding Tutorials forum part of the General Coding category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2011
Posts: 59
Received Thanks: 112
cSilentFont v1.0 (silentchris LPD3DXFONT class)

"cSilentFont" is a C++ class coded and shared by silentchris.
All credits goes to silentchris and the MSDN (microsoft).
Please credit silentchris if you use this class.

"cSilentFont" got made to make LPD3DXFONT-using easier and let it render faster.
It`s recommend to use the PreloadText function to get the highest performance
out of your LPD3DXFONT. Make sure that you only call it once for each static string.

With "cSilentFont" you are able to draw fonts in alot different styles:

DrawText() :
LEFT
LEFT_SHADOW
CENTER
CENTER_SHADOW
RIGHT
RIGHT_SHADOW

DrawTextMaxLen() :
LEFT
LEFT_SHADOW

DrawTextAutoScrolling() :
Well, there aint an alignement. You set a start x/y position and a scroll-w. It scrolls from the right to the left inside the field of x-(x+w) and restarts at (x+w) after the text left the field. You can also set the speed. You`ll need to add a buffer as we want it to be different for each call...


----How to use----

-------
[1]
You`ll need to initalise your font by using the Constructor!
Define
Code:
C_Font *pFont;
anywhere on the top of any file.

Call
Code:
pFont = new C_Font( pDevice, "Arial", 14, FW_SEMIBOLD, FALSE );
inside your present/endscene ONCE

Parameter 1: Your D3D Device
Parameter 2: The name of your font
Parameter 3: The size of your font
Parameter 4: The Weight of your font
Parameter 5: You want your font Italic?!

-------
[2]
Before your drawing you`ll need to call (every frame), basically at the top of present/endscene
Code:
pFont->InitVolatileResources();
-------
[3]
DRAW!

-------
[4]
After your drawing you`ll need to call (every frame), basically on the bottom of present/endscene
Code:
pFont->FreeVolatileResources();
-------

Header File & Readme are attached
Attached Files
File Type: zip cSilentFont.zip (3.8 KB, 6 views)
SILENTChris is offline  
Old 07/24/2011, 07:53   #2
 
elite*gold: 0
Join Date: Apr 2011
Posts: 59
Received Thanks: 112
SILENTChris is offline  
Reply


Similar Threads Similar Threads
SILENTCHRIS D3D *Updated*
04/26/2011 - WarRock Hacks, Bots, Cheats & Exploits - 3 Replies
http://www.abload.de/img/hack5x4v.png Download > Click Virustotal > Click
SILENTChris D3D *update*
08/08/2010 - WarRock Hacks, Bots, Cheats & Exploits - 27 Replies
SILENTChris D3D *update* Funktion: big.png - Bilder und Fotos kostenlos auf ImageBanana hochladen Download Link: File-Upload.net - SILENTChris-D3D.rar :) Have Fun



All times are GMT +1. The time now is 03:24.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.