home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 July & August
/
PCWorld_2006-07-08_cd.bin
/
temacd
/
planearcade
/
planearcade.exe
/
Tank3.bmp
/
font2D.h
< prev
next >
Wrap
C/C++ Source or Header
|
2004-01-08
|
1KB
|
64 lines
#ifndef _FONT_2D_
#define _FONT_2D_
//-----------------------------------
//CUSTOMVERTEX
//---------------------------------------
struct CUSTOMVERTEXFONT
{
float x,y,z,rhw;
D3DCOLOR color;
FLOAT tu, tv;
};
//CUSTOMVERTEXT
#define D3DFVF_CUSTOMVERTEXFONT (D3DFVF_XYZRHW|D3DFVF_DIFFUSE|D3DFVF_TEX1)
//--------------------------------------------------------------------
// Name: Font2D Class
// Desc: ************
//--------------------------------------------------------------------
class FONT2D
{
private:
CUSTOMVERTEXFONT *Vertex;
LPDIRECT3DTEXTURE9 g_pTexture;
int ActVer;
int ActChar;
void PrintCharacter(float X,float Y,char Pis);
public:
//
//VLASTNOSTI
//
//sirka vyska fontu
int Width;
int Height;
//farba fontu
COLOR Color;
//
//FUNCKIE
//
//vytvori font
void LoadFont(char *FileName,COLOR ColorKey,int WidthChar,int HeightChar);
//vytlaci text
void Print(float X,float Y,char *Text);
//vyrenderuje
void Render();
~FONT2D();
FONT2D();
};
#endif //_FONT_2D_