-
Notifications
You must be signed in to change notification settings - Fork 1
/
FontRenderer.h
53 lines (49 loc) · 1.52 KB
/
FontRenderer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#pragma once
#include "4dm.h"
#include "Tex2D.h"
#include "Shader.h"
namespace fdm
{
class Shader;
class Tex2D;
class FontRenderer
{
public:
stl::string text;
glm::ivec2 charSize; // 0x20
int fontSize; // 0x28
glm::ivec2 pos; // 0x2C
glm::vec4 color; // 0x34
glm::mat4 model; // 0x44
bool centered; // 0x84
PAD(0x3);
const Tex2D* texture; // 0x88
const Shader* shader; // 0x90
unsigned int VAO; // 0x98
unsigned int charVBO; // 0x9C
FontRenderer(const Tex2D* texture, const Shader* shader)
{
reinterpret_cast<void(__thiscall*)(FontRenderer* self, const Tex2D* texture, const Shader* shader)>(getFuncAddr((int)Func::FontRenderer::FontRenderer))(this, texture, shader);
}
FontRenderer()
{
reinterpret_cast<void(__thiscall*)(FontRenderer* self)>(getFuncAddr((int)Func::FontRenderer::FontRendererA))(this);
}
void setText(const stl::string& text)
{
return reinterpret_cast<void (__thiscall*)(FontRenderer* self, const stl::string& text)>(getFuncAddr((int)Func::FontRenderer::setText))(this, text);
}
void render()
{
return reinterpret_cast<void (__thiscall*)(FontRenderer* self)>(getFuncAddr((int)Func::FontRenderer::render))(this);
}
void updateModel()
{
return reinterpret_cast<void (__thiscall*)(FontRenderer* self)>(getFuncAddr((int)Func::FontRenderer::updateModel))(this);
}
void move(FontRenderer& other)
{
return reinterpret_cast<void (__thiscall*)(FontRenderer* self, FontRenderer& other)>(getFuncAddr((int)Func::FontRenderer::move))(this, other);
}
};
}