Normal
Using the RefDef structure, you could use these:[CODE]float getScreenPercentX(float percent) { Get_cgs()->refdef.Width*percent;}float getScreenPercentY(float percent) { Get_cgs()->refdef.Height*percent;}[/CODE]Call like:[CODE]getScreenPercentX(0.5); //50%orgetScreenPercentX(0.25) //25%[/CODE]The structure:[CODE]typedef struct{ /* 0000 */ int X; /* 0004 */ int Y; /* 0008 */ int Width; /* 000C */ int Height; /* 0010 */ Vector2 Fov; /* 0018 */ Vector3 viewOrigin; /* 0024 */ Vector3 viewAxis[3]; /* 0048 */} RefDef_s;[/CODE]You'll need to fill the structure, but you should be able to do this easily, with all the sources that have been released for MW3
Using the RefDef structure, you could use these:
[CODE]float getScreenPercentX(float percent) {
Get_cgs()->refdef.Width*percent;
}
float getScreenPercentY(float percent) {
Get_cgs()->refdef.Height*percent;
}[/CODE]
Call like:
[CODE]getScreenPercentX(0.5); //50%
or
getScreenPercentX(0.25) //25%[/CODE]
The structure:
[CODE]typedef struct
{
/* 0000 */ int X;
/* 0004 */ int Y;
/* 0008 */ int Width;
/* 000C */ int Height;
/* 0010 */ Vector2 Fov;
/* 0018 */ Vector3 viewOrigin;
/* 0024 */ Vector3 viewAxis[3];
/* 0048 */
} RefDef_s;[/CODE]
You'll need to fill the structure, but you should be able to do this easily, with all the sources that have been released for MW3