Need to import d3dx9.h and d3dx9.lib filesCode:bool World2Screen(D3DXVECTOR3* InOut) { D3DXVECTOR3 vScreen; D3DXVECTOR3 PlayerPos(InOut->x, InOut->y, InOut->z); D3DVIEWPORT9 viewPort = { 0 }; D3DXMATRIX projection, view, world; view = CMemory::instance()->Read<D3DXMATRIX>(Matrix - 0x80); projection = CMemory::instance()->Read<D3DXMATRIX>(Matrix - 0x40); viewPort = CMemory::instance()->Read<D3DVIEWPORT9>(Matrix); world = D3DXMATRIX( 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f); D3DXVec3Project(&vScreen, &PlayerPos, &viewPort, &projection, &view, &world); if (vScreen.z <= 1.0f) { *InOut = vScreen; return true; } return false; }
Matrix = 00 00 00 00 00 00 00 00 ?? ?? 00 00 ?? 03 00 00 ?? ?? ?? ?? 00 00 80 3F The static address found is