forked from Ares-Developers/YRpp
-
Notifications
You must be signed in to change notification settings - Fork 25
/
BitFont.h
79 lines (67 loc) · 1.46 KB
/
BitFont.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#pragma once
#include <YRPP.h>
class NOVTABLE BitFont
{
public:
static constexpr reference<BitFont*, 0x89C4D0> Instance {};
private:
BitFont(const char* pFileName) { JMP_THIS(0x433880); }
public:
virtual ~BitFont() RX;
bool GetTextDimension(const wchar_t* pText, int* pWidth, int* pHeight, int nMaxWidth) { JMP_THIS(0x433CF0); }
int Blit(wchar_t wch, int X, int Y, int nColor) { JMP_THIS(0x434120); }
bool Lock(Surface* pSurface) { JMP_THIS(0x4348F0); }
bool UnLock(Surface* pSurface) { JMP_THIS(0x434990); }
unsigned char* GetCharacterBitmap(wchar_t wch) { JMP_THIS(0x4346C0); }
void SetBounds(LTRBStruct* pBound)
{
if (pBound)
this->Bounds = *pBound;
else
this->Bounds = { 0,0,0,0 };
}
void SetColor(WORD nColor)
{
this->Color = nColor;
}
void SetField20(int x)
{
this->field_20 = x;
}
void SetField41(char flag)
{
this->field_41 = flag;
}
/// Properties
struct InternalData
{
int FontWidth;
int Stride;
int FontHeight;
int Lines;
int Count;
int SymbolDataSize;
short* SymbolTable;
char* Bitmaps;
int ValidSymbolCount;
};
static InternalData* __fastcall LoadInternalData(const char* pFileName)
{ JMP_STD(0x433990); }
InternalData* InternalPTR;
void* Pointer_8;
short* pGraphBuffer;
int PitchDiv2;
int Unknown_14;
wchar_t* field_18;
int field_1C;
int field_20;
WORD Color;
short DefaultColor2;
int Unknown_28;
int State_2C;
LTRBStruct Bounds;
bool Bool_40;
bool field_41;
bool field_42;
bool field_43;
};