cod4
Code:lea edx, [esp+80h+var_60]
push edx
lea eax, [esp+84h+var_6C]
push eax
mov eax, [esp+88h+arg_0]
lea edx, [esp+88h+var_54]
call sub_42D6D0
add esp, 8
Code:char __usercall sub_42D6D0<al>(int a1<eax>, int edx0<edx>, int a2, int a3)
cod5Code:void w2s(float * x, float * y, Vec3 vPoint )
{
DWORD dwCall = 0x42D6D0;
__asm{
PUSH y
PUSH x
MOV EAX, 0x0
MOV EDX, vPoint
CALL [dwCall]
ADD ESP,0x8
}
}
cod mw2Code:void w2s(Vec3 vPoint, float * x, float * y)
{
DWORD dwCall = 0x43E900;
__asm{
push y
push x
mov eax, vPoint
mov ecx, 0x0
call [dwCall]
add esp, 0x8
}
}
cod blackopsCode:class w2s_t
{
public:
char unknown[108];
};
w2s_t * w2scalc = (w2s_t*)0x108B658;
void w2s(Vec3 vPoint, float screen[2])
{
DWORD dwCall = 0x416290;
__asm {
push screen
push vPoint
push w2scalc
push 0x0
call [dwCall]
add esp, 0x10
}
}
Credits Crucial for borrowing mw2 accountCode:bool __cdecl sub_4913C0(int CalcIndex, Vec3 Point, float vOut[2])
usage :
float vOut[2];
if(w2s(0, entity->vorigin, vOut))
{
DrawText(vOut[0], vOut[1], "text");
}
Credits go to .Encore for locating the offset in cod5

