Minor - Refactor name - V10.5.0

This commit is contained in:
2025-05-21 16:40:27 +02:00
parent 24203060be
commit f9d4523f09
113 changed files with 5200 additions and 5017 deletions

View File

@@ -0,0 +1,64 @@
#ifndef _FONTCLASS_H_
#define _FONTCLASS_H_
//////////////
// INCLUDES //
//////////////
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
///////////////////////
// MY CLASS INCLUDES //
///////////////////////
#include "texture_class.h"
////////////////////////////////////////////////////////////////////////////////
// Class name: font_class
////////////////////////////////////////////////////////////////////////////////
class font_class
{
private:
struct FontType
{
float left, right;
int size;
};
struct VertexType
{
XMFLOAT3 position;
XMFLOAT2 texture;
};
public:
font_class();
font_class(const font_class&);
~font_class();
bool Initialize(ID3D11Device*, ID3D11DeviceContext*, int);
void Shutdown();
ID3D11ShaderResourceView* GetTexture();
void BuildVertexArray(void*, char*, float, float);
int GetSentencePixelLength(char*);
int GetFontHeight();
private:
bool LoadFontData(char*);
void ReleaseFontData();
bool LoadTexture(ID3D11Device*, ID3D11DeviceContext*, char*);
void ReleaseTexture();
private:
FontType* m_Font;
texture_class* m_Texture;
float m_fontHeight;
int m_spaceSize;
};
#endif