Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CGraphics {
- public:
- char __pad0[0x28];
- int m_nScreenWidth; // 0x0028
- int m_nScreenHeight; // 0x002C
- char __pad1[0x18];
- CCamera* m_pCamera; // 0x0048
- char __pad2[0x298];
- CDisplay* m_pDisplay; // 0x02E8
- void DrawDebugText(const char* text, int x, int y, Color color) {
- typedef int (__thiscall* DrawDebugTextFn)(void*, const char*, __int64, __int64, int);
- static DrawDebugTextFn DrawText = (DrawDebugTextFn)0x1403071C0;
- DrawText(this, text, x, y, color.Code());
- }
- bool WorldToScreen(const Vector3& vOrigin, Vector3& vOut) {
- float world[4];
- world[0] = vOrigin.x;
- world[1] = vOrigin.y;
- world[2] = vOrigin.z;
- world[3] = 1.0f;
- int x = 0, y = 0;
- typedef bool (__thiscall* World2ScreenFn)(void*, float*, int*, int*);
- static World2ScreenFn World2Screen = (World2ScreenFn)0x14030B180;
- if (!World2Screen(this, world, &x, &y)) {
- return false;
- }
- vOut.x = x;
- vOut.y = y;
- return true;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement