00001 #ifndef BITMAPFONT_H 00002 #define BITMAPFONT_H 00003 00004 #pragma once 00005 #include "CustomFont.h" 00006 #include "TextureManager.h" 00007 #include "MaterialManager.h" 00008 00010 00014 class CBitmapFont : public CCustomFont 00015 { 00016 CREATOR(CFontManager); 00017 00018 protected: 00019 00020 CBitmapFont(); 00021 virtual ~CBitmapFont(); 00022 00023 public: 00029 virtual int LoadXML(TiXmlNode *pDataNode, CString strFilename); 00035 virtual int SaveXML(TiXmlNode *pDataNode, CString strFilename); 00040 virtual void Destroy(); 00045 virtual void Draw(CString strFormat, ...); 00051 virtual void DrawChar(float x, float y, char c); 00062 virtual int Create( UINT uiNormalOrItalic, 00063 UINT uiCharLength, 00064 UINT uiCharHeight, 00065 UINT uiQuadLength, 00066 UINT uiQuadHeight, 00067 UINT uiSpacing); 00072 void SetTextPos(float X, float Y); 00077 tVERTEX2f& GetTextPos(); 00082 UINT GetQuadLength(); 00087 UINT GetQuadHeight(); 00092 UINT GetCharLength(); 00097 UINT GetCharHeight(); 00102 UINT GetSpacing(); 00107 virtual bool IsOfType(eEntityType eType); 00108 00109 protected: 00110 CTexture *m_pTexture; 00111 CMaterial *m_pMaterial; 00113 UINT m_uiNI; 00114 UINT m_uiCharLength, 00115 m_uiCharHeight, 00116 m_uiQuadLength, 00117 m_uiQuadHeight, 00118 m_uiSpacing; 00120 UINT m_uiFontBase; 00121 UINT m_uiNumLists; 00123 tVERTEX2f m_TextPos; 00124 }; 00125 00127 void BeginBlend(); 00129 void EndBlend(); 00130 00132 void BeginOrtho(); 00134 void EndOrtho(); 00135 00136 #endif