class ISurface { public: void DrawSetColor(int r, int g, int b, int a) { typedef void(__thiscall* OriginalFn)(PVOID, int, int, int, int); getvfunc(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(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(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(this, 15)(this, x0, y0, x1, y1); } void DrawSetTextFont(unsigned long font) { typedef void(__thiscall* OriginalFn)(PVOID, unsigned long); getvfunc(this, 17)(this, font); } void DrawSetTextColor(int r, int g, int b, int a) { typedef void(__thiscall* OriginalFn)(PVOID, int, int, int, int); getvfunc(this, 19)(this, r, g, b, a); } void DrawSetTextPos(int x, int y) { typedef void(__thiscall* OriginalFn)(PVOID, int, int); getvfunc(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(this, 22)(this, text, textLen, 0); } unsigned long Create_Font() { typedef unsigned int(__thiscall* OriginalFn)(PVOID); return getvfunc(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(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(this, 72)(this, font, text, wide, tall); } };