75 lines
2.2 KiB
C
75 lines
2.2 KiB
C
|
|
|||
|
|
|||
|
class ISurface
|
|||
|
{
|
|||
|
public:
|
|||
|
|
|||
|
void DrawSetColor(int r, int g, int b, int a)
|
|||
|
{
|
|||
|
typedef void(__thiscall* OriginalFn)(PVOID, int, int, int, int);
|
|||
|
getvfunc<OriginalFn>(this, 11)(this, r, g, b, a);
|
|||
|
}
|
|||
|
|
|||
|
void DrawFilledRect(int x0, int y0, int x1, int y1)
|
|||
|
{
|
|||
|
typedef void(__thiscall* OriginalFn)(PVOID, int, int, int, int);
|
|||
|
getvfunc<OriginalFn>(this, 12)(this, x0, y0, x1, y1);
|
|||
|
}
|
|||
|
|
|||
|
void DrawOutlinedRect(int x0, int y0, int x1, int y1)
|
|||
|
{
|
|||
|
typedef void(__thiscall* OriginalFn)(PVOID, int, int, int, int);
|
|||
|
getvfunc<OriginalFn>(this, 14)(this, x0, y0, x1, y1);
|
|||
|
}
|
|||
|
|
|||
|
void DrawLine(int x0, int y0, int x1, int y1)
|
|||
|
{
|
|||
|
typedef void(__thiscall* OriginalFn)(PVOID, int, int, int, int);
|
|||
|
getvfunc<OriginalFn>(this, 15)(this, x0, y0, x1, y1);
|
|||
|
}
|
|||
|
|
|||
|
void DrawSetTextFont(unsigned long font)
|
|||
|
{
|
|||
|
typedef void(__thiscall* OriginalFn)(PVOID, unsigned long);
|
|||
|
getvfunc<OriginalFn>(this, 17)(this, font);
|
|||
|
}
|
|||
|
|
|||
|
void DrawSetTextColor(int r, int g, int b, int a)
|
|||
|
{
|
|||
|
typedef void(__thiscall* OriginalFn)(PVOID, int, int, int, int);
|
|||
|
getvfunc<OriginalFn>(this, 19)(this, r, g, b, a);
|
|||
|
}
|
|||
|
|
|||
|
void DrawSetTextPos(int x, int y)
|
|||
|
{
|
|||
|
typedef void(__thiscall* OriginalFn)(PVOID, int, int);
|
|||
|
getvfunc<OriginalFn>(this, 20)(this, x, y);
|
|||
|
}
|
|||
|
|
|||
|
void DrawPrintText(const wchar_t *text, int textLen)
|
|||
|
{
|
|||
|
typedef void(__thiscall* OriginalFn)(PVOID, const wchar_t *, int, int);
|
|||
|
return getvfunc<OriginalFn>(this, 22)(this, text, textLen, 0);
|
|||
|
}
|
|||
|
|
|||
|
unsigned long Create_Font()
|
|||
|
{
|
|||
|
typedef unsigned int(__thiscall* OriginalFn)(PVOID);
|
|||
|
return getvfunc<OriginalFn>(this, 63)(this);
|
|||
|
}
|
|||
|
|
|||
|
void SetFontGlyphSet(unsigned long &font, const char *windowsFontName, int tall, int weight, int blur, int scanlines, int flags)
|
|||
|
{
|
|||
|
typedef void(__thiscall* OriginalFn)(PVOID, unsigned long, const char*, int, int, int, int, int, int, int);
|
|||
|
getvfunc<OriginalFn>(this, 64)(this, font, windowsFontName, tall, weight, blur, scanlines, flags, 0, 0);
|
|||
|
}
|
|||
|
|
|||
|
void GetTextSize(unsigned long font, const wchar_t *text, int &wide, int &tall)
|
|||
|
{
|
|||
|
typedef void(__thiscall* OriginalFn)(void*, unsigned long font, const wchar_t *text, int &wide, int &tall);
|
|||
|
getvfunc<OriginalFn>(this, 72)(this, font, text, wide, tall);
|
|||
|
}
|
|||
|
};
|
|||
|
|
|||
|
|