bool isPointOnScreen ( CVector vecWorld ) { const D3DXMATRIX m { reinterpret_cast ( 0xB6FA2C ) } ; const unsigned long dwLenX = * reinterpret_cast ( 0xC17044 ) ; const unsigned long dwLenY = * reinterpret_cast ( 0xC17048 ) ; float z ; z = ( vecWorld . fX * m . _33 ) + ( vecWorld . fY * m . _23 ) + ( vecWorld . fZ * m . _13 ) + m . _43 ; return z >= 1.0f ; } CVector tpos = { x , y , z } ; if ( isPointOnScreen ( tpos ) ) { // Дальше рисуем фигуры... }
bool isPointOnScreen ( CVector * position , float radius ) { auto camera = * reinterpret_cast ( 0xB6F028 ) ; return reinterpret_cast ( 0x420D40 ) ( camera , position , radius ) ; }