mirror of
https://github.com/UberGames/rpgxEF.git
synced 2025-04-22 08:50:48 +00:00
Pust just to have Jenkins handle it
I replacing all floats with double via slughammer-methode was overkill, however using Jenkins I can easier find where it makes sense this will be roled back with the next commit Signed-off-by: Harry Young <hendrik.gerritzen@googlemail.com>
This commit is contained in:
parent
b7806d4bf4
commit
e9c546ffc3
23 changed files with 219 additions and 219 deletions
|
@ -62,9 +62,9 @@ static void UI_AddBotsMenu_BotEvent( void* ptr, int32_t event ) {
|
|||
return;
|
||||
}
|
||||
|
||||
addBotsMenuInfo.bots[addBotsMenuInfo.selectedBotNum].color = (float*)colorTable[CT_DKGOLD1];
|
||||
addBotsMenuInfo.bots[addBotsMenuInfo.selectedBotNum].color = (double*)colorTable[CT_DKGOLD1];
|
||||
addBotsMenuInfo.selectedBotNum = ((menucommon_s*)ptr)->id - ID_BOTNAME0;
|
||||
addBotsMenuInfo.bots[addBotsMenuInfo.selectedBotNum].color = (float*)colorTable[CT_YELLOW];
|
||||
addBotsMenuInfo.bots[addBotsMenuInfo.selectedBotNum].color = (double*)colorTable[CT_YELLOW];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1543,8 +1543,8 @@ void UI_AdminMenu( qboolean fromConsole ) {
|
|||
typedef struct {
|
||||
int32_t id;
|
||||
char model[MAX_QPATH];
|
||||
float height;
|
||||
float weight;
|
||||
double height;
|
||||
double weight;
|
||||
char race[MAX_NAME_LENGTH];
|
||||
char age[MAX_NAME_LENGTH];
|
||||
int32_t classId;
|
||||
|
|
|
@ -1502,8 +1502,8 @@ void UI_AdminMenu( qboolean fromConsole ) {
|
|||
typedef struct {
|
||||
int32_t id;
|
||||
char model[MAX_QPATH];
|
||||
float height;
|
||||
float weight;
|
||||
double height;
|
||||
double weight;
|
||||
char race[MAX_NAME_LENGTH];
|
||||
char age[MAX_NAME_LENGTH];
|
||||
int32_t classId;
|
||||
|
|
|
@ -68,7 +68,7 @@ const char menuEmptyLine[] = " ";
|
|||
UI_ClampCvar
|
||||
=================
|
||||
*/
|
||||
float UI_ClampCvar( float min, float max, float value )
|
||||
double UI_ClampCvar( double min, double max, double value )
|
||||
{
|
||||
if ( value < min ) return min;
|
||||
if ( value > max ) return max;
|
||||
|
@ -167,7 +167,7 @@ void UI_ForceMenuOff (void)
|
|||
UI_LerpColor
|
||||
=================
|
||||
*/
|
||||
static void UI_LerpColor(vec4_t a, vec4_t b, vec4_t c, float t)
|
||||
static void UI_LerpColor(vec4_t a, vec4_t b, vec4_t c, double t)
|
||||
{
|
||||
int32_t i;
|
||||
|
||||
|
@ -238,14 +238,14 @@ static void UI_DrawBannerString2( int32_t x, int32_t y, const char* str, vec4_t
|
|||
{
|
||||
const char* s;
|
||||
char ch;
|
||||
float ax;
|
||||
float ay;
|
||||
float aw;
|
||||
float ah;
|
||||
float frow;
|
||||
float fcol;
|
||||
float fwidth;
|
||||
float fheight;
|
||||
double ax;
|
||||
double ay;
|
||||
double aw;
|
||||
double ah;
|
||||
double frow;
|
||||
double fcol;
|
||||
double fwidth;
|
||||
double fheight;
|
||||
|
||||
/* draw the colored text */
|
||||
trap_R_SetColor( color );
|
||||
|
@ -259,18 +259,18 @@ static void UI_DrawBannerString2( int32_t x, int32_t y, const char* str, vec4_t
|
|||
{
|
||||
ch = *s & 255;
|
||||
if ( ch == ' ' ) {
|
||||
ax += ((float)PROPB_SPACE_WIDTH + (float)PROPB_GAP_WIDTH)* uis.scalex;
|
||||
ax += ((double)PROPB_SPACE_WIDTH + (double)PROPB_GAP_WIDTH)* uis.scalex;
|
||||
}
|
||||
else if ( ch >= 'A' && ch <= 'Z' ) {
|
||||
ch -= 'A';
|
||||
fcol = (float)propMapB[(int32_t)ch][0] / 256.0f; /*256.0f*/
|
||||
frow = (float)propMapB[(int32_t)ch][1] / 256.0f;
|
||||
fwidth = (float)propMapB[(int32_t)ch][2] / 256.0f;
|
||||
fheight = (float)PROPB_HEIGHT / 256.0f;
|
||||
aw = (float)propMapB[(int32_t)ch][2] * uis.scalex;
|
||||
ah = (float)PROPB_HEIGHT * uis.scaley;
|
||||
fcol = (double)propMapB[(int32_t)ch][0] / 256.0f; /*256.0f*/
|
||||
frow = (double)propMapB[(int32_t)ch][1] / 256.0f;
|
||||
fwidth = (double)propMapB[(int32_t)ch][2] / 256.0f;
|
||||
fheight = (double)PROPB_HEIGHT / 256.0f;
|
||||
aw = (double)propMapB[(int32_t)ch][2] * uis.scalex;
|
||||
ah = (double)PROPB_HEIGHT * uis.scaley;
|
||||
trap_R_DrawStretchPic( ax, ay, aw, ah, fcol, frow, fcol+fwidth, frow+fheight, uis.charsetPropB );
|
||||
ax += (aw + (float)PROPB_GAP_WIDTH * uis.scalex);
|
||||
ax += (aw + (double)PROPB_GAP_WIDTH * uis.scalex);
|
||||
}
|
||||
s++;
|
||||
}
|
||||
|
@ -493,15 +493,15 @@ static void UI_DrawProportionalString2( int32_t x, int32_t y, const char* str, v
|
|||
{
|
||||
const char* s;
|
||||
unsigned char ch;
|
||||
float ax;
|
||||
float ay,holdY;
|
||||
float aw;
|
||||
float ah;
|
||||
float frow;
|
||||
float fcol;
|
||||
float fwidth;
|
||||
float fheight;
|
||||
float sizeScale;
|
||||
double ax;
|
||||
double ay,holdY;
|
||||
double aw;
|
||||
double ah;
|
||||
double frow;
|
||||
double fcol;
|
||||
double fwidth;
|
||||
double fheight;
|
||||
double sizeScale;
|
||||
int32_t colorI;
|
||||
int32_t special;
|
||||
|
||||
|
@ -543,19 +543,19 @@ static void UI_DrawProportionalString2( int32_t x, int32_t y, const char* str, v
|
|||
|
||||
ch = *s & 255;
|
||||
if ( ch == ' ' ) {
|
||||
aw = (float)PROP_SPACE_TINY_WIDTH;
|
||||
aw = (double)PROP_SPACE_TINY_WIDTH;
|
||||
}
|
||||
else if ( propMap[ch][2] != -1 ) {
|
||||
/* Because some foreign characters were a little different */
|
||||
special = specialTinyPropChars[ch][0];
|
||||
ay = holdY + (specialTinyPropChars[ch][1] * uis.scaley);
|
||||
|
||||
fcol = (float ) propMapTiny[ch][0] / 256.0f; /*256.0f*/
|
||||
frow = (float)propMapTiny[ch][1] / 256.0f;
|
||||
fwidth = (float)propMapTiny[ch][2] / 256.0f;
|
||||
fheight = (float)(PROP_TINY_HEIGHT + special) / 256.0f;
|
||||
aw = (float)propMapTiny[ch][2] * uis.scalex * sizeScale;
|
||||
ah = (float)(PROP_TINY_HEIGHT+ special) * uis.scaley * sizeScale;
|
||||
fcol = (double ) propMapTiny[ch][0] / 256.0f; /*256.0f*/
|
||||
frow = (double)propMapTiny[ch][1] / 256.0f;
|
||||
fwidth = (double)propMapTiny[ch][2] / 256.0f;
|
||||
fheight = (double)(PROP_TINY_HEIGHT + special) / 256.0f;
|
||||
aw = (double)propMapTiny[ch][2] * uis.scalex * sizeScale;
|
||||
ah = (double)(PROP_TINY_HEIGHT+ special) * uis.scaley * sizeScale;
|
||||
|
||||
/* TiM - adjust for widescreen */
|
||||
if ( UI_IsWidescreen() )
|
||||
|
@ -572,11 +572,11 @@ static void UI_DrawProportionalString2( int32_t x, int32_t y, const char* str, v
|
|||
}
|
||||
|
||||
|
||||
ax += (aw + (float)PROP_GAP_TINY_WIDTH * uis.scalex * sizeScale);
|
||||
ax += (aw + (double)PROP_GAP_TINY_WIDTH * uis.scalex * sizeScale);
|
||||
|
||||
/* again adjust for widescreen */
|
||||
if ( UI_IsWidescreen() )
|
||||
ax -= ((float)PROP_GAP_TINY_WIDTH * uis.scalex * sizeScale)*(1.0f-uis.widescreen.ratio);
|
||||
ax -= ((double)PROP_GAP_TINY_WIDTH * uis.scalex * sizeScale)*(1.0f-uis.widescreen.ratio);
|
||||
|
||||
s++;
|
||||
}
|
||||
|
@ -597,19 +597,19 @@ static void UI_DrawProportionalString2( int32_t x, int32_t y, const char* str, v
|
|||
|
||||
ch = *s & 255;
|
||||
if ( ch == ' ' ) {
|
||||
aw = (float)PROP_SPACE_BIG_WIDTH * uis.scalex;
|
||||
aw = (double)PROP_SPACE_BIG_WIDTH * uis.scalex;
|
||||
}
|
||||
else if ( propMap[ch][2] != -1 ) {
|
||||
/* Because some foreign characters were a little different */
|
||||
special = specialBigPropChars[ch][0];
|
||||
ay = holdY + (specialBigPropChars[ch][1] * uis.scaley);
|
||||
|
||||
fcol = (float ) propMapBig[ch][0] / 256.0f; /* 256.0f */
|
||||
frow = (float)propMapBig[ch][1] / 256.0f;
|
||||
fwidth = (float)propMapBig[ch][2] / 256.0f;
|
||||
fheight = (float)(PROP_BIG_HEIGHT+ special) / 256.0f;
|
||||
aw = (float)propMapBig[ch][2] * uis.scalex * sizeScale;
|
||||
ah = (float)(PROP_BIG_HEIGHT+ special) * uis.scaley * sizeScale;
|
||||
fcol = (double ) propMapBig[ch][0] / 256.0f; /* 256.0f */
|
||||
frow = (double)propMapBig[ch][1] / 256.0f;
|
||||
fwidth = (double)propMapBig[ch][2] / 256.0f;
|
||||
fheight = (double)(PROP_BIG_HEIGHT+ special) / 256.0f;
|
||||
aw = (double)propMapBig[ch][2] * uis.scalex * sizeScale;
|
||||
ah = (double)(PROP_BIG_HEIGHT+ special) * uis.scaley * sizeScale;
|
||||
|
||||
/* TiM - adjust for widescreen */
|
||||
if ( UI_IsWidescreen() )
|
||||
|
@ -625,11 +625,11 @@ static void UI_DrawProportionalString2( int32_t x, int32_t y, const char* str, v
|
|||
}
|
||||
|
||||
|
||||
ax += (aw + (float)PROP_GAP_BIG_WIDTH * uis.scalex * sizeScale);
|
||||
ax += (aw + (double)PROP_GAP_BIG_WIDTH * uis.scalex * sizeScale);
|
||||
|
||||
/* again adjust for widescreen */
|
||||
if ( UI_IsWidescreen() )
|
||||
ax -= ((float)PROP_GAP_BIG_WIDTH * uis.scalex * sizeScale)*(1.0f-uis.widescreen.ratio);
|
||||
ax -= ((double)PROP_GAP_BIG_WIDTH * uis.scalex * sizeScale)*(1.0f-uis.widescreen.ratio);
|
||||
|
||||
s++;
|
||||
}
|
||||
|
@ -650,19 +650,19 @@ static void UI_DrawProportionalString2( int32_t x, int32_t y, const char* str, v
|
|||
|
||||
ch = *s & 255;
|
||||
if ( ch == ' ' ) {
|
||||
aw = (float)PROP_SPACE_WIDTH * uis.scalex * sizeScale;
|
||||
aw = (double)PROP_SPACE_WIDTH * uis.scalex * sizeScale;
|
||||
}
|
||||
else if ( propMap[ch][2] != -1 ) {
|
||||
/* Because some foreign characters were a little different */
|
||||
special = specialPropChars[ch][0];
|
||||
ay = holdY + (specialPropChars[ch][1] * uis.scaley);
|
||||
|
||||
fcol = (float)propMap[ch][0] / 256.0f;
|
||||
frow = (float)propMap[ch][1] / 256.0f;
|
||||
fwidth = (float)propMap[ch][2] / 256.0f;
|
||||
fheight = (float)(PROP_HEIGHT+ special) / 256.0f;
|
||||
aw = (float)propMap[ch][2] * uis.scalex * sizeScale;
|
||||
ah = (float)(PROP_HEIGHT+ special) * uis.scaley * sizeScale;
|
||||
fcol = (double)propMap[ch][0] / 256.0f;
|
||||
frow = (double)propMap[ch][1] / 256.0f;
|
||||
fwidth = (double)propMap[ch][2] / 256.0f;
|
||||
fheight = (double)(PROP_HEIGHT+ special) / 256.0f;
|
||||
aw = (double)propMap[ch][2] * uis.scalex * sizeScale;
|
||||
ah = (double)(PROP_HEIGHT+ special) * uis.scaley * sizeScale;
|
||||
|
||||
/* TiM - adjust for widescreen */
|
||||
if ( ui_handleWidescreen.integer && uis.widescreen.ratio )
|
||||
|
@ -678,11 +678,11 @@ static void UI_DrawProportionalString2( int32_t x, int32_t y, const char* str, v
|
|||
}
|
||||
|
||||
|
||||
ax += (aw + (float)PROP_GAP_WIDTH * uis.scalex * sizeScale);
|
||||
ax += (aw + (double)PROP_GAP_WIDTH * uis.scalex * sizeScale);
|
||||
|
||||
/* again adjust for widescreen */
|
||||
if ( UI_IsWidescreen() )
|
||||
ax -= ((float)PROP_GAP_WIDTH * uis.scalex * sizeScale)*(1.0f-uis.widescreen.ratio);
|
||||
ax -= ((double)PROP_GAP_WIDTH * uis.scalex * sizeScale)*(1.0f-uis.widescreen.ratio);
|
||||
|
||||
s++;
|
||||
}
|
||||
|
@ -696,7 +696,7 @@ static void UI_DrawProportionalString2( int32_t x, int32_t y, const char* str, v
|
|||
UI_ProportionalSizeScale
|
||||
=================
|
||||
*/
|
||||
float UI_ProportionalSizeScale( int32_t style ) {
|
||||
double UI_ProportionalSizeScale( int32_t style ) {
|
||||
if( style & UI_SMALLFONT ) {
|
||||
return PROP_SMALL_SIZE_SCALE;
|
||||
}
|
||||
|
@ -713,7 +713,7 @@ UI_DrawProportionalString
|
|||
void UI_DrawProportionalString( int32_t x, int32_t y, const char* str, int32_t style, vec4_t color ) {
|
||||
vec4_t drawcolor;
|
||||
int32_t width;
|
||||
float sizeScale;
|
||||
double sizeScale;
|
||||
int32_t charstyle=0;
|
||||
|
||||
if ((style & UI_BLINK) && ((uis.realtime/BLINK_DIVISOR) & 1))
|
||||
|
@ -818,12 +818,12 @@ static void UI_DrawString2( int32_t x, int32_t y, const char* str, vec4_t color,
|
|||
char ch;
|
||||
int32_t forceColor = qfalse; /* APSFIXME; */
|
||||
vec4_t tempcolor;
|
||||
float ax;
|
||||
float ay;
|
||||
float aw;
|
||||
float ah;
|
||||
float frow;
|
||||
float fcol;
|
||||
double ax;
|
||||
double ay;
|
||||
double aw;
|
||||
double ah;
|
||||
double frow;
|
||||
double fcol;
|
||||
|
||||
if (y < -charh)
|
||||
/* offscreen */
|
||||
|
@ -900,7 +900,7 @@ void UI_DrawString( int32_t x, int32_t y, const char* str, int32_t style, vec4_t
|
|||
int32_t charh;
|
||||
vec4_t newcolor;
|
||||
vec4_t lowlight;
|
||||
float *drawcolor;
|
||||
double *drawcolor;
|
||||
vec4_t dropcolor;
|
||||
|
||||
if( !str ) {
|
||||
|
@ -2042,7 +2042,7 @@ UI_AdjustFrom640
|
|||
Adjusted for resolution and screen aspect ratio
|
||||
================
|
||||
*/
|
||||
void UI_AdjustFrom640( float *x, float *y, float *w, float *h ) {
|
||||
void UI_AdjustFrom640( double *x, double *y, double *w, double *h ) {
|
||||
/* expect valid pointers */
|
||||
/* *x = *x * uis.scale + uis.bias;*/
|
||||
*x *= uis.scalex;
|
||||
|
@ -2062,7 +2062,7 @@ void UI_AdjustFrom640( float *x, float *y, float *w, float *h ) {
|
|||
}
|
||||
}
|
||||
|
||||
void UI_DrawNamedPic( float x, float y, float width, float height, const char *picname ) {
|
||||
void UI_DrawNamedPic( double x, double y, double width, double height, const char *picname ) {
|
||||
qhandle_t hShader;
|
||||
|
||||
hShader = trap_R_RegisterShaderNoMip( picname );
|
||||
|
@ -2070,16 +2070,16 @@ void UI_DrawNamedPic( float x, float y, float width, float height, const char *p
|
|||
trap_R_DrawStretchPic( x, y, width, height, 0, 0, 1, 1, hShader );
|
||||
}
|
||||
|
||||
void UI_DrawHandleStretchPic( float x, float y, float w, float h, float s0, float t0, float s1, float t1, qhandle_t hShader ) {
|
||||
void UI_DrawHandleStretchPic( double x, double y, double w, double h, double s0, double t0, double s1, double t1, qhandle_t hShader ) {
|
||||
UI_AdjustFrom640( &x, &y, &w, &h );
|
||||
trap_R_DrawStretchPic( x, y, w, h, s0, t0, s1, t1, hShader );
|
||||
}
|
||||
|
||||
void UI_DrawHandlePic( float x, float y, float w, float h, qhandle_t hShader ) {
|
||||
float s0;
|
||||
float s1;
|
||||
float t0;
|
||||
float t1;
|
||||
void UI_DrawHandlePic( double x, double y, double w, double h, qhandle_t hShader ) {
|
||||
double s0;
|
||||
double s1;
|
||||
double t0;
|
||||
double t1;
|
||||
|
||||
/* TiM - security check */
|
||||
if ( w == 0.0f || h == 0.0f )
|
||||
|
@ -2116,7 +2116,7 @@ UI_FillRect
|
|||
Coordinates are 640*480 virtual values
|
||||
=================
|
||||
*/
|
||||
void UI_FillRect( float x, float y, float width, float height, const float *color ) {
|
||||
void UI_FillRect( double x, double y, double width, double height, const double *color ) {
|
||||
trap_R_SetColor( color );
|
||||
|
||||
UI_AdjustFrom640( &x, &y, &width, &height );
|
||||
|
@ -2132,7 +2132,7 @@ UI_DrawRect
|
|||
Coordinates are 640*480 virtual values
|
||||
=================
|
||||
*/
|
||||
void UI_DrawRect( float x, float y, float width, float height, const float *color ) {
|
||||
void UI_DrawRect( double x, double y, double width, double height, const double *color ) {
|
||||
trap_R_SetColor( color );
|
||||
|
||||
UI_AdjustFrom640( &x, &y, &width, &height );
|
||||
|
|
|
@ -129,7 +129,7 @@ static void UI_CDKeyMenu_DrawKey( void *self )
|
|||
menufield_s *f;
|
||||
qboolean focus;
|
||||
int32_t style;
|
||||
float *color;
|
||||
double *color;
|
||||
int32_t x, y;
|
||||
|
||||
f = (menufield_s *)self;
|
||||
|
|
|
@ -38,7 +38,7 @@ void *holdControlPtr;
|
|||
int32_t holdControlEvent;
|
||||
static menuaction_s *vid_apply_action;
|
||||
|
||||
float setup_menubuttons[8][2] =
|
||||
double setup_menubuttons[8][2] =
|
||||
{
|
||||
{125,62},
|
||||
{125,86},
|
||||
|
@ -278,8 +278,8 @@ typedef struct {
|
|||
typedef struct
|
||||
{
|
||||
char* name;
|
||||
float defaultvalue;
|
||||
float value;
|
||||
double defaultvalue;
|
||||
double value;
|
||||
} configcvar_t;
|
||||
|
||||
#define SAVE_NOOP 0
|
||||
|
@ -748,7 +748,7 @@ Controls_GetCvarDefault
|
|||
=================
|
||||
*/
|
||||
/*
|
||||
static float Controls_GetCvarDefault( char* name )
|
||||
static double Controls_GetCvarDefault( char* name )
|
||||
{
|
||||
configcvar_t* cvarptr;
|
||||
int32_t i;
|
||||
|
@ -771,7 +771,7 @@ static float Controls_GetCvarDefault( char* name )
|
|||
Controls_GetCvarValue
|
||||
=================
|
||||
*/
|
||||
static float Controls_GetCvarValue( char* name )
|
||||
static double Controls_GetCvarValue( char* name )
|
||||
{
|
||||
configcvar_t* cvarptr;
|
||||
int32_t i;
|
||||
|
|
|
@ -122,7 +122,7 @@ static qhandle_t spaceBackdrop;
|
|||
|
||||
int32_t i;
|
||||
|
||||
static float cm_buttons[9][2] =
|
||||
static double cm_buttons[9][2] =
|
||||
{
|
||||
{129,62},
|
||||
{129,86},
|
||||
|
@ -711,8 +711,8 @@ static void UI_drawLogo ( void )
|
|||
refEntity_t ent;
|
||||
vec3_t origin = {0.0, 0.0, 0.0};
|
||||
vec3_t angles;
|
||||
float adjust;
|
||||
float x, y, w, h;
|
||||
double adjust;
|
||||
double x, y, w, h;
|
||||
//vec4_t color = {0.5, 0, 0, 1};
|
||||
|
||||
// setup the refdef
|
||||
|
@ -733,7 +733,7 @@ static void UI_drawLogo ( void )
|
|||
refdef.width = w;
|
||||
refdef.height = h;
|
||||
|
||||
adjust = 0; // JDC: Kenneth asked me to stop this 1.0 * sin( (float)uis.realtime / 1000 );
|
||||
adjust = 0; // JDC: Kenneth asked me to stop this 1.0 * sin( (double)uis.realtime / 1000 );
|
||||
refdef.fov_x = 17 + adjust; //60 //TiM: Controls width scale
|
||||
refdef.fov_y = 19.6875 + adjust; //19.6875
|
||||
|
||||
|
@ -749,7 +749,7 @@ static void UI_drawLogo ( void )
|
|||
|
||||
memset( &ent, 0, sizeof(ent) );
|
||||
|
||||
adjust = 20.0/300.0 * uis.realtime; //5.0 * sin( (float)uis.realtime / 5000 );
|
||||
adjust = 20.0/300.0 * uis.realtime; //5.0 * sin( (double)uis.realtime / 5000 );
|
||||
VectorSet( angles, 0, 180 + adjust, 0 );
|
||||
AnglesToAxis( angles, ent.axis );
|
||||
ent.hModel = s_credits.logoModel;
|
||||
|
|
|
@ -334,7 +334,7 @@ static void UI_InGameMenu_Draw( void )
|
|||
{
|
||||
char* playerClass;
|
||||
char string[256];
|
||||
float scale;
|
||||
double scale;
|
||||
int32_t y=191;
|
||||
int32_t yOffset = 23;
|
||||
// char* team;
|
||||
|
@ -498,7 +498,7 @@ static void UI_InGameMenu_Draw( void )
|
|||
//Q_strncpyz( string, string, 25 );
|
||||
UI_DrawProportionalString( 270, y, string, UI_LEFT|UI_SMALLFONT, colorTable[CT_LTGOLD1]);
|
||||
|
||||
scale = trap_Cvar_VariableValue( "height" ) * (float)BASE_HEIGHT;
|
||||
scale = trap_Cvar_VariableValue( "height" ) * (double)BASE_HEIGHT;
|
||||
|
||||
Com_sprintf( string, sizeof(string), "%s: %3.2f%s", menu_normal_text[MNT_HEIGHT], scale, HEIGHT_UNIT );
|
||||
//Q_strncpyz( string, string, 25 );
|
||||
|
@ -509,9 +509,9 @@ static void UI_InGameMenu_Draw( void )
|
|||
//Q_strncpyz( string, string, 25 );
|
||||
UI_DrawProportionalString( 270, y, string, UI_LEFT|UI_SMALLFONT, colorTable[CT_LTGOLD1]);
|
||||
|
||||
scale = trap_Cvar_VariableValue( "height" ) * trap_Cvar_VariableValue( "weight" ) * (float)BASE_WEIGHT;
|
||||
scale = trap_Cvar_VariableValue( "height" ) * trap_Cvar_VariableValue( "weight" ) * (double)BASE_WEIGHT;
|
||||
if ( s_ingame.playerinfo.gender == GENDER_FEMALE )
|
||||
scale *= (float)FEMALE_OFFSET;
|
||||
scale *= (double)FEMALE_OFFSET;
|
||||
|
||||
Com_sprintf( string, sizeof(string), "%s: %3.2f%s", menu_normal_text[MNT_WEIGHT], scale, WEIGHT_UNIT );
|
||||
//Q_strncpyz( string, string, 25 );
|
||||
|
|
|
@ -85,7 +85,7 @@ static struct
|
|||
static struct
|
||||
{
|
||||
menuframework_s menu;
|
||||
float timer;
|
||||
double timer;
|
||||
qhandle_t cornerPic;
|
||||
// int32_t menuType; // 0 = library, 1 = astrometrics
|
||||
} s_libraryaccessing;
|
||||
|
@ -408,7 +408,7 @@ static void TurnOnLogDesc(char *s,int32_t lineWidth,int32_t startY)
|
|||
|
||||
}
|
||||
|
||||
static void UI_Draw3DModel( float x, float y, float w, float h, qhandle_t model, vec3_t origin, vec3_t angles)
|
||||
static void UI_Draw3DModel( double x, double y, double w, double h, qhandle_t model, vec3_t origin, vec3_t angles)
|
||||
{
|
||||
refdef_t refdef;
|
||||
refEntity_t ent;
|
||||
|
|
|
@ -1522,10 +1522,10 @@ typedef struct
|
|||
{
|
||||
menucommon_s generic;
|
||||
|
||||
float minvalue;
|
||||
float maxvalue;
|
||||
float curvalue;
|
||||
float defvalue; //RPG-X: TiM | I'm going to make it if u click the button part, it'll reset to this default value
|
||||
double minvalue;
|
||||
double maxvalue;
|
||||
double curvalue;
|
||||
double defvalue; //RPG-X: TiM | I'm going to make it if u click the button part, it'll reset to this default value
|
||||
|
||||
int32_t focusWidth; // For graph
|
||||
int32_t focusHeight; // For graph
|
||||
|
@ -1553,7 +1553,7 @@ typedef struct
|
|||
int32_t textcolor; // Normal color
|
||||
int32_t textcolor2; // Highlight color
|
||||
|
||||
float range;
|
||||
double range;
|
||||
|
||||
qboolean mouseDown;
|
||||
} menuslider_s;
|
||||
|
@ -1648,7 +1648,7 @@ typedef struct
|
|||
|
||||
int32_t width;
|
||||
int32_t height;
|
||||
/*@shared@*/ float* focuscolor;
|
||||
/*@shared@*/ double* focuscolor;
|
||||
|
||||
int32_t color; // Normal color
|
||||
int32_t color2; // Highlight color
|
||||
|
@ -1675,8 +1675,8 @@ typedef struct
|
|||
int32_t normaltextEnum3; // Enum from normal menu text
|
||||
int32_t buttontextEnum3; // Enum from button text
|
||||
int32_t style;
|
||||
/*@shared@*/ float *color; // Normal color
|
||||
/*@shared@*/ float *color2; // Highlight color
|
||||
/*@shared@*/ double *color; // Normal color
|
||||
/*@shared@*/ double *color2; // Highlight color
|
||||
int32_t focusX;
|
||||
int32_t focusY;
|
||||
int32_t focusWidth;
|
||||
|
@ -1686,7 +1686,7 @@ typedef struct
|
|||
typedef struct
|
||||
{
|
||||
int32_t type; // STRING or GRAPHIC
|
||||
float timer; // When it changes
|
||||
double timer; // When it changes
|
||||
int32_t x; // X position
|
||||
int32_t y; // Y positon
|
||||
int32_t width; // Graphic width
|
||||
|
@ -1993,11 +1993,11 @@ typedef struct {
|
|||
int32_t frame;
|
||||
int32_t frameTime; // time when ->frame will be exactly on
|
||||
|
||||
float backlerp;
|
||||
double backlerp;
|
||||
|
||||
float yawAngle;
|
||||
double yawAngle;
|
||||
qboolean yawing;
|
||||
float pitchAngle;
|
||||
double pitchAngle;
|
||||
qboolean pitching;
|
||||
|
||||
int32_t animationNumber; // may include ANIM_TOGGLEBIT
|
||||
|
@ -2037,8 +2037,8 @@ typedef struct {
|
|||
|
||||
gender_t gender;
|
||||
|
||||
float height;
|
||||
float weight;
|
||||
double height;
|
||||
double weight;
|
||||
|
||||
qhandle_t legsModel;
|
||||
qhandle_t legsSkin;
|
||||
|
@ -2096,7 +2096,7 @@ typedef struct {
|
|||
qboolean newModel;
|
||||
|
||||
qboolean barrelSpinning;
|
||||
float barrelAngle;
|
||||
double barrelAngle;
|
||||
int32_t barrelTime;
|
||||
|
||||
//TiM - Just to give this thing a little spice. :)
|
||||
|
@ -2109,9 +2109,9 @@ typedef struct {
|
|||
int32_t realWeapon;
|
||||
} playerInfo_t;
|
||||
|
||||
void UI_DrawPlayer( float x, float y, float w, float h, vec3_t pOrigin, playerInfo_t *pi, int32_t time ); //RPG-X : TiM- origin
|
||||
void UI_DrawPlayer( double x, double y, double w, double h, vec3_t pOrigin, playerInfo_t *pi, int32_t time ); //RPG-X : TiM- origin
|
||||
void UI_PlayerInfo_SetModel( playerInfo_t *pi, const char *model );
|
||||
void UI_PlayerInfo_SetInfo( playerInfo_t *pi, int32_t legsAnim, int32_t torsoAnim, vec3_t viewAngles, vec3_t moveAngles, weapon_t weaponNum, float height, float weight, qboolean chat );
|
||||
void UI_PlayerInfo_SetInfo( playerInfo_t *pi, int32_t legsAnim, int32_t torsoAnim, vec3_t viewAngles, vec3_t moveAngles, weapon_t weaponNum, double height, double weight, qboolean chat );
|
||||
qboolean UI_RegisterClientModelname( playerInfo_t *pi, const char *modelSkinName );
|
||||
|
||||
//
|
||||
|
@ -2161,9 +2161,9 @@ typedef struct {
|
|||
qhandle_t cursor;
|
||||
qhandle_t rb_on;
|
||||
qhandle_t rb_off;
|
||||
float scalex;
|
||||
float scaley;
|
||||
// float bias;
|
||||
double scalex;
|
||||
double scaley;
|
||||
// double bias;
|
||||
qboolean demoversion;
|
||||
qboolean firstdraw;
|
||||
|
||||
|
@ -2195,21 +2195,21 @@ extern void UI_KeyEvent( int32_t key );
|
|||
extern void UI_MouseEvent( int32_t dx, int32_t dy );
|
||||
extern void UI_Refresh( int32_t realtime );
|
||||
extern qboolean UI_ConsoleCommand( void );
|
||||
extern float UI_ClampCvar( float min, float max, float value );
|
||||
extern void UI_DrawNamedPic( float x, float y, float width, float height, const char *picname );
|
||||
extern void UI_DrawHandlePic( float x, float y, float w, float h, qhandle_t hShader );
|
||||
extern void UI_DrawHandleStretchPic( float x, float y, float w, float h, float s0, float t0, float s1, float t1, qhandle_t hShader );
|
||||
extern void UI_FillRect( float x, float y, float width, float height, const float *color );
|
||||
extern void UI_DrawRect( float x, float y, float width, float height, const float *color );
|
||||
//extern void UI_LerpColor(vec4_t a, vec4_t b, vec4_t c, float t);
|
||||
extern double UI_ClampCvar( double min, double max, double value );
|
||||
extern void UI_DrawNamedPic( double x, double y, double width, double height, const char *picname );
|
||||
extern void UI_DrawHandlePic( double x, double y, double w, double h, qhandle_t hShader );
|
||||
extern void UI_DrawHandleStretchPic( double x, double y, double w, double h, double s0, double t0, double s1, double t1, qhandle_t hShader );
|
||||
extern void UI_FillRect( double x, double y, double width, double height, const double *color );
|
||||
extern void UI_DrawRect( double x, double y, double width, double height, const double *color );
|
||||
//extern void UI_LerpColor(vec4_t a, vec4_t b, vec4_t c, double t);
|
||||
extern void UI_DrawBannerString( int32_t x, int32_t y, const char* str, int32_t style, vec4_t color );
|
||||
extern float UI_ProportionalSizeScale( int32_t style );
|
||||
extern double UI_ProportionalSizeScale( int32_t style );
|
||||
extern void UI_DrawProportionalString( int32_t x, int32_t y, const char* str, int32_t style, vec4_t color );
|
||||
extern int32_t UI_ProportionalStringWidth( const char* str,int32_t style );
|
||||
extern void UI_DrawString( int32_t x, int32_t y, const char* str, int32_t style, vec4_t color, qboolean highRes );
|
||||
extern void UI_DrawChar( int32_t x, int32_t y, int32_t ch, int32_t style, vec4_t color );
|
||||
extern qboolean UI_CursorInRect (int32_t x, int32_t y, int32_t width, int32_t height);
|
||||
extern void UI_AdjustFrom640( float *x, float *y, float *w, float *h );
|
||||
extern void UI_AdjustFrom640( double *x, double *y, double *w, double *h );
|
||||
|
||||
//extern void UI_DrawTextBox (int32_t x, int32_t y, int32_t width, int32_t lines);
|
||||
extern qboolean UI_IsFullscreen( void );
|
||||
|
@ -2272,9 +2272,9 @@ int32_t trap_Milliseconds( void );
|
|||
void trap_Cvar_Register( vmCvar_t *vmCvar, const char *varName, const char *defaultValue, int32_t flags );
|
||||
void trap_Cvar_Update( vmCvar_t *vmCvar );
|
||||
void trap_Cvar_Set( const char *var_name, const char *value );
|
||||
float trap_Cvar_VariableValue( const char *var_name );
|
||||
double trap_Cvar_VariableValue( const char *var_name );
|
||||
void trap_Cvar_VariableStringBuffer( const char *var_name, char *buffer, int32_t bufsize );
|
||||
void trap_Cvar_SetValue( const char *var_name, float value );
|
||||
void trap_Cvar_SetValue( const char *var_name, double value );
|
||||
void trap_Cvar_Reset( const char *name );
|
||||
void trap_Cvar_Create( const char *var_name, const char *var_value, int32_t flags );
|
||||
void trap_Cvar_InfoStringBuffer( int32_t bit, char *buffer, int32_t bufsize );
|
||||
|
@ -2292,12 +2292,12 @@ qhandle_t trap_R_RegisterShaderNoMip( const char *name );
|
|||
void trap_R_ClearScene( void );
|
||||
void trap_R_AddRefEntityToScene( const refEntity_t *re );
|
||||
void trap_R_AddPolyToScene( qhandle_t hShader , int32_t numVerts, const polyVert_t *verts );
|
||||
void trap_R_AddLightToScene( const vec3_t org, float intensity, float r, float g, float b );
|
||||
void trap_R_AddLightToScene( const vec3_t org, double intensity, double r, double g, double b );
|
||||
void trap_R_RenderScene( const refdef_t *fd );
|
||||
void trap_R_SetColor( const float *rgba );
|
||||
void trap_R_DrawStretchPic( float x, float y, float w, float h, float s1, float t1, float s2, float t2, qhandle_t hShader );
|
||||
void trap_R_SetColor( const double *rgba );
|
||||
void trap_R_DrawStretchPic( double x, double y, double w, double h, double s1, double t1, double s2, double t2, qhandle_t hShader );
|
||||
void trap_UpdateScreen( void );
|
||||
void trap_CM_LerpTag( orientation_t *tag, clipHandle_t mod, int32_t startFrame, int32_t endFrame, float frac, const char *tagName );
|
||||
void trap_CM_LerpTag( orientation_t *tag, clipHandle_t mod, int32_t startFrame, int32_t endFrame, double frac, const char *tagName );
|
||||
void trap_S_StartLocalSound( sfxHandle_t sfx, int32_t channelNum );
|
||||
sfxHandle_t trap_S_RegisterSound( const char *sample );
|
||||
void trap_Key_KeynumToStringBuf( int32_t keynum, char *buf, int32_t buflen );
|
||||
|
@ -2355,7 +2355,7 @@ void UI_DisplayOptionsMenu( void );
|
|||
//
|
||||
//void UI_SoundOptionsMenu_Cache( void );
|
||||
//void UI_SoundOptionsMenu( void );
|
||||
extern float setup_menubuttons[8][2];
|
||||
extern double setup_menubuttons[8][2];
|
||||
void UI_SoundMenu( void);
|
||||
void UI_SoundMenu_Cache(void);
|
||||
|
||||
|
|
|
@ -618,7 +618,7 @@ END MOD
|
|||
|
||||
|
||||
|
||||
static float mm_buttons[6][2] =
|
||||
static double mm_buttons[6][2] =
|
||||
{
|
||||
{129,62},
|
||||
{129,86},
|
||||
|
@ -628,7 +628,7 @@ static float mm_buttons[6][2] =
|
|||
{305,109}
|
||||
};
|
||||
|
||||
static float federationTimer;
|
||||
static double federationTimer;
|
||||
|
||||
// Data for Welcome In Menu
|
||||
static struct
|
||||
|
@ -999,8 +999,8 @@ MainArenaServers_Compare
|
|||
=================
|
||||
*/
|
||||
static int32_t QDECL MainArenaServers_Compare( const void *arg1, const void *arg2 ) {
|
||||
float f1;
|
||||
float f2;
|
||||
double f1;
|
||||
double f2;
|
||||
table_t* t1;
|
||||
table_t* t2;
|
||||
|
||||
|
@ -1612,8 +1612,8 @@ Phenix
|
|||
refEntity_t ent;
|
||||
vec3_t origin = {0.0, 0.0, 0.0};
|
||||
vec3_t angles;
|
||||
float adjust;
|
||||
float x, y, w, h;
|
||||
double adjust;
|
||||
double x, y, w, h;
|
||||
//vec4_t color = {0.5, 0, 0, 1};
|
||||
|
||||
// setup the refdef
|
||||
|
@ -1635,7 +1635,7 @@ Phenix
|
|||
refdef.width = w;
|
||||
refdef.height = h;
|
||||
|
||||
adjust = 0; // JDC: Kenneth asked me to stop this 1.0 * sin( (float)uis.realtime / 1000 );
|
||||
adjust = 0; // JDC: Kenneth asked me to stop this 1.0 * sin( (double)uis.realtime / 1000 );
|
||||
refdef.fov_x = 10 + adjust; //60 //TiM: Controls width scale // yeah.... coz it's the FOV lol //17
|
||||
//that being the case, we have to aim for a value of 10
|
||||
//(10's what I use in MD3View... anything higher and it starts to distort)
|
||||
|
@ -1655,7 +1655,7 @@ Phenix
|
|||
|
||||
memset( &ent, 0, sizeof(ent) );
|
||||
|
||||
adjust = 20.0/300.0 * uis.realtime; //5.0 * sin( (float)uis.realtime / 5000 );
|
||||
adjust = 20.0/300.0 * uis.realtime; //5.0 * sin( (double)uis.realtime / 5000 );
|
||||
VectorSet( angles, 0, 180 + adjust, 0 );
|
||||
AnglesToAxis( angles, ent.axis );
|
||||
ent.hModel = s_main.logoModel;
|
||||
|
@ -1743,7 +1743,7 @@ static void Player_DrawPlayer( void ) //*self )
|
|||
vec3_t viewangles;
|
||||
vec3_t origin = {-3, 5, -3 };//{ 0, 3.8, 0};
|
||||
char buf[MAX_QPATH];
|
||||
// float yaw;
|
||||
// double yaw;
|
||||
|
||||
trap_Cvar_VariableStringBuffer( "model", buf, sizeof( buf ) );
|
||||
|
||||
|
@ -1847,7 +1847,7 @@ static weapongraphics_s weapon_graphics[UI_NUM_WEAPONS] = //was WP_NUM_WEAPONS,
|
|||
};
|
||||
|
||||
|
||||
/*static void UI_Draw3DModel( float x, float y, float w, float h, qhandle_t model, vec3_t origin, vec3_t angles, vec3_t weaponMidpoint ) {
|
||||
/*static void UI_Draw3DModel( double x, double y, double w, double h, qhandle_t model, vec3_t origin, vec3_t angles, vec3_t weaponMidpoint ) {
|
||||
refdef_t refdef;
|
||||
refEntity_t ent;
|
||||
|
||||
|
@ -1954,7 +1954,7 @@ static void M_MainMenu_Graphics (void)
|
|||
char string[256];
|
||||
char temp[128];
|
||||
int32_t i;
|
||||
float scale;
|
||||
double scale;
|
||||
servernode_t* node;
|
||||
int32_t style;
|
||||
|
||||
|
@ -2109,7 +2109,7 @@ static void M_MainMenu_Graphics (void)
|
|||
}
|
||||
UI_DrawProportionalString( 270, y, string, UI_LEFT|UI_SMALLFONT, colorTable[CT_LTGOLD1]);
|
||||
|
||||
scale = trap_Cvar_VariableValue( "height" ) * (float)BASE_HEIGHT;
|
||||
scale = trap_Cvar_VariableValue( "height" ) * (double)BASE_HEIGHT;
|
||||
|
||||
Com_sprintf( string, sizeof( string ), "%s: %3.2f%s", menu_normal_text[MNT_HEIGHT], scale, HEIGHT_UNIT );
|
||||
if ( strlen( string ) > 20 )
|
||||
|
@ -2148,9 +2148,9 @@ static void M_MainMenu_Graphics (void)
|
|||
}
|
||||
UI_DrawProportionalString( 270, y, string, UI_LEFT|UI_SMALLFONT, colorTable[CT_LTGOLD1]);
|
||||
|
||||
scale = trap_Cvar_VariableValue( "height" ) * trap_Cvar_VariableValue( "weight" ) * (float)BASE_WEIGHT;
|
||||
scale = trap_Cvar_VariableValue( "height" ) * trap_Cvar_VariableValue( "weight" ) * (double)BASE_WEIGHT;
|
||||
if ( s_main.playerinfo.gender == GENDER_FEMALE )
|
||||
scale *= (float)FEMALE_OFFSET;
|
||||
scale *= (double)FEMALE_OFFSET;
|
||||
|
||||
Com_sprintf( string, sizeof( string ), "%s: %3.2f%s", menu_normal_text[MNT_WEIGHT], scale, WEIGHT_UNIT );
|
||||
if ( strlen( string ) > 20 )
|
||||
|
|
|
@ -1113,7 +1113,7 @@ static void PlayerModel_DrawPlayer( void *self )
|
|||
return;
|
||||
}
|
||||
|
||||
UI_DrawPlayer( (float)b->generic.x, (float)b->generic.y, (float)b->width, (float)b->height, origin, &s_playermodel.playerinfo, (int32_t)(uis.realtime/1.5) );
|
||||
UI_DrawPlayer( (double)b->generic.x, (double)b->generic.y, (double)b->width, (double)b->height, origin, &s_playermodel.playerinfo, (int32_t)(uis.realtime/1.5) );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
static int32_t dp_realtime;
|
||||
static float jumpHeight;
|
||||
static double jumpHeight;
|
||||
|
||||
//TiM : Bolton Table
|
||||
stringID_table_t BoltonTable[BOLTON_MAX + 1] =
|
||||
|
@ -442,7 +442,7 @@ static void UI_RunLerpFrame( playerInfo_t *ci, lerpFrame_t *lf, int32_t newAnima
|
|||
if ( lf->frameTime == lf->oldFrameTime ) {
|
||||
lf->backlerp = 0;
|
||||
} else {
|
||||
lf->backlerp = 1.0 - (float)( dp_realtime - lf->oldFrameTime ) / ( lf->frameTime - lf->oldFrameTime );
|
||||
lf->backlerp = 1.0 - (double)( dp_realtime - lf->oldFrameTime ) / ( lf->frameTime - lf->oldFrameTime );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -452,8 +452,8 @@ static void UI_RunLerpFrame( playerInfo_t *ci, lerpFrame_t *lf, int32_t newAnima
|
|||
UI_PlayerAnimation
|
||||
===============
|
||||
*/
|
||||
static void UI_PlayerAnimation( playerInfo_t *pi, int32_t *legsOld, int32_t *legs, float *legsBackLerp,
|
||||
int32_t *torsoOld, int32_t *torso, float *torsoBackLerp ) {
|
||||
static void UI_PlayerAnimation( playerInfo_t *pi, int32_t *legsOld, int32_t *legs, double *legsBackLerp,
|
||||
int32_t *torsoOld, int32_t *torso, double *torsoBackLerp ) {
|
||||
|
||||
// legs animation
|
||||
pi->legsAnimationTimer -= uis.frametime;
|
||||
|
@ -495,11 +495,11 @@ static void UI_PlayerAnimation( playerInfo_t *pi, int32_t *legsOld, int32_t *leg
|
|||
UI_SwingAngles
|
||||
==================
|
||||
*/
|
||||
static void UI_SwingAngles( float destination, float swingTolerance, float clampTolerance,
|
||||
float speed, float *angle, qboolean *swinging ) {
|
||||
float swing;
|
||||
float move;
|
||||
float scale;
|
||||
static void UI_SwingAngles( double destination, double swingTolerance, double clampTolerance,
|
||||
double speed, double *angle, qboolean *swinging ) {
|
||||
double swing;
|
||||
double move;
|
||||
double scale;
|
||||
|
||||
if ( !*swinging ) {
|
||||
// see if a swing should be started
|
||||
|
@ -557,7 +557,7 @@ static void UI_SwingAngles( float destination, float swingTolerance, float clamp
|
|||
UI_MovedirAdjustment
|
||||
======================
|
||||
*/
|
||||
/*static float UI_MovedirAdjustment( playerInfo_t *pi ) {
|
||||
/*static double UI_MovedirAdjustment( playerInfo_t *pi ) {
|
||||
vec3_t relativeAngles;
|
||||
vec3_t moveVector;
|
||||
|
||||
|
@ -603,7 +603,7 @@ UI_PlayerAngles
|
|||
*/
|
||||
static void UI_PlayerAngles( playerInfo_t *pi, vec3_t legs[3], vec3_t torso[3], vec3_t head[3] ) {
|
||||
vec3_t legsAngles, torsoAngles, headAngles;
|
||||
float dest;
|
||||
double dest;
|
||||
|
||||
VectorCopy( pi->viewAngles, headAngles );
|
||||
headAngles[YAW] = AngleMod( headAngles[YAW] );
|
||||
|
@ -682,10 +682,10 @@ static void UI_PlayerFloatSprite( playerInfo_t *pi, vec3_t origin, qhandle_t sha
|
|||
UI_MachinegunSpinAngle
|
||||
======================
|
||||
*/
|
||||
/*float UI_MachinegunSpinAngle( playerInfo_t *pi ) {
|
||||
/*double UI_MachinegunSpinAngle( playerInfo_t *pi ) {
|
||||
int32_t delta;
|
||||
float angle;
|
||||
float speed;
|
||||
double angle;
|
||||
double speed;
|
||||
int32_t torsoAnim;
|
||||
|
||||
delta = dp_realtime - pi->barrelTime;
|
||||
|
@ -696,7 +696,7 @@ UI_MachinegunSpinAngle
|
|||
delta = COAST_TIME;
|
||||
}
|
||||
|
||||
speed = 0.5 * ( SPIN_SPEED + (float)( COAST_TIME - delta ) / COAST_TIME );
|
||||
speed = 0.5 * ( SPIN_SPEED + (double)( COAST_TIME - delta ) / COAST_TIME );
|
||||
angle = pi->barrelAngle + delta * speed;
|
||||
}
|
||||
|
||||
|
@ -719,7 +719,7 @@ UI_MachinegunSpinAngle
|
|||
UI_DrawPlayer
|
||||
===============
|
||||
*/
|
||||
void UI_DrawPlayer( float x, float y, float w, float h, vec3_t pOrigin, playerInfo_t *pi, int32_t time ) { //RPG-X : TiM- Origin added
|
||||
void UI_DrawPlayer( double x, double y, double w, double h, vec3_t pOrigin, playerInfo_t *pi, int32_t time ) { //RPG-X : TiM- Origin added
|
||||
refdef_t refdef;
|
||||
refEntity_t legs;
|
||||
refEntity_t torso;
|
||||
|
@ -730,8 +730,8 @@ void UI_DrawPlayer( float x, float y, float w, float h, vec3_t pOrigin, playerIn
|
|||
int32_t renderfx;
|
||||
vec3_t mins = {-16, -24, -24};
|
||||
vec3_t maxs = {16, 16, 32};
|
||||
float len;
|
||||
float xx;
|
||||
double len;
|
||||
double xx;
|
||||
|
||||
if ( !pi->legsModel || !pi->torsoModel || !pi->headModel || !pi->animations[0].numFrames ) {
|
||||
return;
|
||||
|
@ -767,7 +767,7 @@ void UI_DrawPlayer( float x, float y, float w, float h, vec3_t pOrigin, playerIn
|
|||
refdef.width = w;
|
||||
refdef.height = h;
|
||||
|
||||
refdef.fov_x = (int32_t)((float)refdef.width / 640.0f * 10.0f); //RPG-X : TiM- 90.0f //Anyone else noticed how the high FOV value distorted the model horribly in the menus? O_o
|
||||
refdef.fov_x = (int32_t)((double)refdef.width / 640.0f * 10.0f); //RPG-X : TiM- 90.0f //Anyone else noticed how the high FOV value distorted the model horribly in the menus? O_o
|
||||
xx = refdef.width / tan( refdef.fov_x / 360 * M_PI );
|
||||
refdef.fov_y = atan2( refdef.height, xx );
|
||||
refdef.fov_y *= ( 360 / M_PI );
|
||||
|
@ -817,10 +817,10 @@ void UI_DrawPlayer( float x, float y, float w, float h, vec3_t pOrigin, playerIn
|
|||
UI_ForceTorsoAnim( pi, anim );
|
||||
|
||||
//play lower
|
||||
pi->legsAnimationTimer = pi->animations[ anim ].numFrames * pi->animations[ anim ].frameLerp * ((float)uis.realtime/(float)dp_realtime);
|
||||
pi->legsAnimationTimer = pi->animations[ anim ].numFrames * pi->animations[ anim ].frameLerp * ((double)uis.realtime/(double)dp_realtime);
|
||||
pi->lowerEmoting = qtrue;
|
||||
|
||||
pi->torsoAnimationTimer = pi->animations[ anim ].numFrames * pi->animations[ anim ].frameLerp * ((float)uis.realtime/(float)dp_realtime);
|
||||
pi->torsoAnimationTimer = pi->animations[ anim ].numFrames * pi->animations[ anim ].frameLerp * ((double)uis.realtime/(double)dp_realtime);
|
||||
pi->upperEmoting = qtrue;
|
||||
|
||||
pi->nextEmoteTime = uis.realtime + ( irandom( 10, 20 ) * 1000 ) + pi->legsAnimationTimer;
|
||||
|
@ -994,7 +994,7 @@ static qboolean UI_ParseAnimationFile( const char *filename, animation_t *animat
|
|||
int32_t len;
|
||||
int32_t i;
|
||||
char *token;
|
||||
float fps;
|
||||
double fps;
|
||||
int32_t skip;
|
||||
char text[20000];
|
||||
fileHandle_t f;
|
||||
|
@ -1867,7 +1867,7 @@ void UI_PlayerInfo_SetModel( playerInfo_t *pi, const char *model ) {
|
|||
UI_PlayerInfo_SetInfo
|
||||
===============
|
||||
*/
|
||||
void UI_PlayerInfo_SetInfo( playerInfo_t *pi, int32_t legsAnim, int32_t torsoAnim, vec3_t viewAngles, vec3_t moveAngles, weapon_t weaponNumber, float height, float weight, qboolean chat ) {
|
||||
void UI_PlayerInfo_SetInfo( playerInfo_t *pi, int32_t legsAnim, int32_t torsoAnim, vec3_t viewAngles, vec3_t moveAngles, weapon_t weaponNumber, double height, double weight, qboolean chat ) {
|
||||
int32_t currentAnim;
|
||||
weapon_t weaponNum;
|
||||
|
||||
|
|
|
@ -49,8 +49,8 @@ typedef struct {
|
|||
//char age[36];
|
||||
//char race[36];
|
||||
|
||||
//float height;
|
||||
//float weight;
|
||||
//double height;
|
||||
//double weight;
|
||||
} initialData_t;
|
||||
|
||||
typedef struct {
|
||||
|
@ -235,9 +235,9 @@ const char* prank_items_actual3[] =
|
|||
};*/
|
||||
|
||||
|
||||
/*static float yawDelta3;
|
||||
static float yaw3 = 180 - 30;
|
||||
static float placeHolder3 = 180 - 30;*/
|
||||
/*static double yawDelta3;
|
||||
static double yaw3 = 180 - 30;
|
||||
static double placeHolder3 = 180 - 30;*/
|
||||
|
||||
/*
|
||||
=======================
|
||||
|
@ -467,7 +467,7 @@ static void PlayerSettings_DrawPlayer( void *self )
|
|||
UI_PlayerInfo_SetInfo( &s_playersettings.playerinfo, BOTH_WALK1, BOTH_WALK1, viewangles, vec3_origin, WP_0, s_playersettings.height.curvalue, s_playersettings.weight.curvalue, qfalse );
|
||||
|
||||
b = (menubitmap_s*) self;
|
||||
UI_DrawPlayer( (float)b->generic.x, (float)b->generic.y, (float)b->width, (float)b->height, origin, &s_playersettings.playerinfo, (int32_t)(uis.realtime/1.5) );
|
||||
UI_DrawPlayer( (double)b->generic.x, (double)b->generic.y, (double)b->width, (double)b->height, origin, &s_playersettings.playerinfo, (int32_t)(uis.realtime/1.5) );
|
||||
|
||||
/*if ( uis.spinView == qtrue && !trap_Key_IsDown( K_MOUSE1 )) {
|
||||
uis.spinView = qfalse;
|
||||
|
@ -658,7 +658,7 @@ static void PlayerSettings_SetMenuItems( void )
|
|||
|
||||
//Player Height
|
||||
{
|
||||
float height = trap_Cvar_VariableValue( "height" );
|
||||
double height = trap_Cvar_VariableValue( "height" );
|
||||
|
||||
//If height was defined, but filled with no value
|
||||
//We don't want infinitely flat players rofl
|
||||
|
@ -672,7 +672,7 @@ static void PlayerSettings_SetMenuItems( void )
|
|||
|
||||
//Player Weight
|
||||
{
|
||||
float weight = trap_Cvar_VariableValue( "weight" );
|
||||
double weight = trap_Cvar_VariableValue( "weight" );
|
||||
|
||||
//If height was defined, but filled with no value
|
||||
//We don't want infinitely thin players rofl
|
||||
|
@ -905,13 +905,13 @@ void PlayerSettingsMenu_Graphics (void)
|
|||
|
||||
//TiM - Player weight and height parameters
|
||||
{
|
||||
float ht = s_playersettings.height.curvalue * (float)BASE_HEIGHT;
|
||||
float wt = s_playersettings.weight.curvalue * s_playersettings.height.curvalue * (float)BASE_WEIGHT;
|
||||
double ht = s_playersettings.height.curvalue * (double)BASE_HEIGHT;
|
||||
double wt = s_playersettings.weight.curvalue * s_playersettings.height.curvalue * (double)BASE_WEIGHT;
|
||||
char htStr[12];
|
||||
char wtStr[12];
|
||||
|
||||
if ( s_playersettings.playerinfo.gender == GENDER_FEMALE )
|
||||
wt *= (float)FEMALE_OFFSET;
|
||||
wt *= (double)FEMALE_OFFSET;
|
||||
|
||||
Com_sprintf( htStr, sizeof(htStr), "%4.2f%s", ht, HEIGHT_UNIT );
|
||||
Com_sprintf( wtStr, sizeof(wtStr), "%4.2f%s", wt, WEIGHT_UNIT );
|
||||
|
|
|
@ -256,7 +256,7 @@ Crosshair_Draw
|
|||
/*
|
||||
static void Crosshair_Draw( void *self ) {
|
||||
menulist_s *s;
|
||||
float *color;
|
||||
double *color;
|
||||
int32_t x, y;
|
||||
int32_t style;
|
||||
qboolean focus;
|
||||
|
|
|
@ -255,7 +255,7 @@ static void Text_Draw(menuframework_s *menu, menutext_s *t )
|
|||
char buff[512];
|
||||
char buff2[512];
|
||||
char buff3[512];
|
||||
float *color;
|
||||
double *color;
|
||||
|
||||
x = t->generic.x;
|
||||
y = t->generic.y;
|
||||
|
@ -387,7 +387,7 @@ static void BText_Draw( menutext_s *t )
|
|||
{
|
||||
int32_t x;
|
||||
int32_t y;
|
||||
float* color;
|
||||
double* color;
|
||||
|
||||
x = t->generic.x;
|
||||
y = t->generic.y;
|
||||
|
@ -411,7 +411,7 @@ static void PText_Init( menutext_s *t )
|
|||
int32_t y;
|
||||
int32_t w;
|
||||
int32_t h;
|
||||
float sizeScale;
|
||||
double sizeScale;
|
||||
|
||||
sizeScale = UI_ProportionalSizeScale( t->style );
|
||||
|
||||
|
@ -442,7 +442,7 @@ static void PText_Draw( menutext_s *t )
|
|||
{
|
||||
int32_t x;
|
||||
int32_t y;
|
||||
float * color;
|
||||
double * color;
|
||||
int32_t style;
|
||||
|
||||
x = t->generic.x;
|
||||
|
@ -519,12 +519,12 @@ Bitmap_Draw
|
|||
*/
|
||||
void Bitmap_Draw( menubitmap_s *b )
|
||||
{
|
||||
float x;
|
||||
float y;
|
||||
float w;
|
||||
float h;
|
||||
double x;
|
||||
double y;
|
||||
double w;
|
||||
double h;
|
||||
vec4_t tempcolor;
|
||||
float* color;
|
||||
double* color;
|
||||
char highlight;
|
||||
int32_t textStyle;
|
||||
menuframework_s *menu;
|
||||
|
@ -741,7 +741,7 @@ static void Action_Draw( menuaction_s *a )
|
|||
{
|
||||
int32_t x, y;
|
||||
int32_t style;
|
||||
// float* color;
|
||||
// double* color;
|
||||
int32_t textColor,buttonColor;
|
||||
|
||||
style = 0;
|
||||
|
@ -884,7 +884,7 @@ static void RadioButton_Draw( menuradiobutton_s *rb )
|
|||
{
|
||||
int32_t x;
|
||||
int32_t y;
|
||||
float *color;
|
||||
double *color;
|
||||
int32_t style;
|
||||
qboolean focus;
|
||||
|
||||
|
@ -986,7 +986,7 @@ static sfxHandle_t Slider_Key( menuslider_s *s, int32_t key )
|
|||
case K_MOUSE1:
|
||||
x = uis.cursorx - s->generic.x;
|
||||
oldvalue = s->curvalue;
|
||||
s->curvalue = (x/(float)(s->focusWidth)) * (s->maxvalue-s->minvalue) + s->minvalue;
|
||||
s->curvalue = (x/(double)(s->focusWidth)) * (s->maxvalue-s->minvalue) + s->minvalue;
|
||||
|
||||
//TiM | If a default was set, reset it in this case
|
||||
if ( x < 0 && s->defvalue ) {
|
||||
|
@ -1083,7 +1083,7 @@ static void Slider_Draw( menuslider_s *s )
|
|||
}
|
||||
|
||||
if ( s->mouseDown ) {
|
||||
s->curvalue = ((uis.cursorx - s->generic.x)/(float)(s->focusWidth)) * (s->maxvalue-s->minvalue) + s->minvalue;
|
||||
s->curvalue = ((uis.cursorx - s->generic.x)/(double)(s->focusWidth)) * (s->maxvalue-s->minvalue) + s->minvalue;
|
||||
s->curvalue = Com_Clamp( s->minvalue, s->maxvalue, s->curvalue);
|
||||
|
||||
s->generic.parent->noNewSelecting = qtrue;
|
||||
|
@ -1111,7 +1111,7 @@ static void Slider_Draw( menuslider_s *s )
|
|||
// clamp thumb
|
||||
if (s->maxvalue > s->minvalue)
|
||||
{
|
||||
s->range = ( s->curvalue - s->minvalue ) / ( float ) ( s->maxvalue - s->minvalue );
|
||||
s->range = ( s->curvalue - s->minvalue ) / ( double ) ( s->maxvalue - s->minvalue );
|
||||
if ( s->range < 0)
|
||||
{
|
||||
s->range = 0;
|
||||
|
@ -1155,7 +1155,7 @@ Slider_Draw
|
|||
*/
|
||||
static void Slider_Draw( menuslider_s *s )
|
||||
{
|
||||
float *color;
|
||||
double *color;
|
||||
int32_t style;
|
||||
int32_t i;
|
||||
int32_t x;
|
||||
|
@ -1200,7 +1200,7 @@ static void Slider_Draw( menuslider_s *s )
|
|||
// clamp thumb
|
||||
if (s->maxvalue > s->minvalue)
|
||||
{
|
||||
s->range = ( s->curvalue - s->minvalue ) / ( float ) ( s->maxvalue - s->minvalue );
|
||||
s->range = ( s->curvalue - s->minvalue ) / ( double ) ( s->maxvalue - s->minvalue );
|
||||
if ( s->range < 0)
|
||||
s->range = 0;
|
||||
else if ( s->range > 1)
|
||||
|
@ -1324,7 +1324,7 @@ static sfxHandle_t SpinControl_InitListRender( menulist_s* s ) {
|
|||
//MIGHTNEEDFIXME: UI_RIGHT...? Eh, If I need it, I'll come back here hehe
|
||||
|
||||
//If we can, cause it's cool, move the list up 1/3 of it's height
|
||||
heightOffset = (float)( s->drawList.down - s->drawList.up ) * (float)0.33;
|
||||
heightOffset = (double)( s->drawList.down - s->drawList.up ) * (double)0.33;
|
||||
s->drawList.up -= heightOffset;
|
||||
s->drawList.down -= heightOffset;
|
||||
|
||||
|
@ -1981,7 +1981,7 @@ void ScrollList_Draw( menulist_s *l )
|
|||
int32_t i;
|
||||
int32_t base;
|
||||
int32_t column;
|
||||
float* color;
|
||||
double* color;
|
||||
qboolean hasfocus;
|
||||
int32_t style;
|
||||
|
||||
|
|
|
@ -163,7 +163,7 @@ static int32_t noyes_items[] =
|
|||
0
|
||||
};
|
||||
|
||||
static float server_buttons[5][2] =
|
||||
static double server_buttons[5][2] =
|
||||
{
|
||||
{274, 72}, // Server type
|
||||
{274, 92}, // Sort by
|
||||
|
@ -314,8 +314,8 @@ ArenaServers_Compare
|
|||
=================
|
||||
*/
|
||||
static int32_t QDECL ArenaServers_Compare( const void *arg1, const void *arg2 ) {
|
||||
float f1;
|
||||
float f2;
|
||||
double f1;
|
||||
double f2;
|
||||
servernode_t* t1;
|
||||
servernode_t* t2;
|
||||
|
||||
|
|
|
@ -136,7 +136,7 @@ void UI_ResetMenu(void) {
|
|||
trap_GetClientState( &cstate );
|
||||
|
||||
if ( cstate.connState >= CA_CONNECTED ) {
|
||||
// float on top of running game
|
||||
// double on top of running game
|
||||
s_reset.menu.fullscreen = qfalse;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -70,7 +70,7 @@ M_sqlMenu_Graphics
|
|||
*/
|
||||
static void M_sqlMenu_Graphics (void)
|
||||
{
|
||||
float bg[] = { 0, 0, 0, 0.7 };
|
||||
double bg[] = { 0, 0, 0, 0.7 };
|
||||
|
||||
trap_R_SetColor(bg);
|
||||
UI_DrawHandlePic(160, 120, 320, 240, box_rounded);
|
||||
|
|
|
@ -2126,7 +2126,7 @@ PlayerName_Draw
|
|||
static void PlayerName_Draw( void *item )
|
||||
{
|
||||
menutext_s *s;
|
||||
float *color;
|
||||
double *color;
|
||||
int32_t x, y;
|
||||
int32_t style;
|
||||
qboolean focus;
|
||||
|
@ -3342,7 +3342,7 @@ AdvancedServer_Update
|
|||
static void AdvancedServer_Update( void)
|
||||
{
|
||||
int32_t holdInt;
|
||||
float holdFloat;
|
||||
double holdFloat;
|
||||
|
||||
// Set colors to normal
|
||||
s_advancedserver.repawntime.field.titlecolor = CT_DKGOLD1;
|
||||
|
@ -4352,7 +4352,7 @@ static void UI_AdvancedServerMenu_Init(int32_t fromMenu)
|
|||
Com_sprintf( s_advancedserver.runspeed.field.buffer, 5, "%i", (int32_t)Com_Clamp( 150, 1000, trap_Cvar_VariableValue( "g_speed" ) ) );
|
||||
Com_sprintf( s_advancedserver.gravity.field.buffer, 5, "%i", (int32_t)Com_Clamp( 0, 5000, trap_Cvar_VariableValue( "g_gravity" ) ) );
|
||||
Com_sprintf( s_advancedserver.knockback.field.buffer, 6, "%i", (int32_t)Com_Clamp( 0, 10000, trap_Cvar_VariableValue( "g_knockback" ) ) );
|
||||
Com_sprintf( s_advancedserver.dmgmult.field.buffer, 12, "%f", (float)Com_Clamp( 0.0, 100.0, trap_Cvar_VariableValue( "g_dmgmult" ) ) );
|
||||
Com_sprintf( s_advancedserver.dmgmult.field.buffer, 12, "%f", (double)Com_Clamp( 0.0, 100.0, trap_Cvar_VariableValue( "g_dmgmult" ) ) );
|
||||
Com_sprintf( s_advancedserver.bot_minplayers.field.buffer, 3, "%i", (int32_t)Com_Clamp( 0, 64, trap_Cvar_VariableValue( "bot_minplayers" ) ) );
|
||||
Com_sprintf( s_advancedserver.forceplayerrespawn.field.buffer, 3, "%i", (int32_t)Com_Clamp( 0, 120, trap_Cvar_VariableValue( "g_forcerespawn" ) ) );
|
||||
Com_sprintf( s_advancedserver.respawninvulnerability.field.buffer, 3, "%i", (int32_t)Com_Clamp( 0, 30, trap_Cvar_VariableValue( "g_ghostRespawn" ) ) );
|
||||
|
|
|
@ -20,7 +20,7 @@ void dllEntry( int32_t (QDECL *syscallptr)( int32_t arg,... ) ) {
|
|||
syscall = syscallptr;
|
||||
}*/
|
||||
|
||||
int32_t PASSFLOAT( float x ) {
|
||||
int32_t PASSFLOAT( double x ) {
|
||||
int32_t floatTemp;
|
||||
floatTemp = x;
|
||||
return floatTemp;
|
||||
|
@ -50,8 +50,8 @@ void trap_Cvar_Set( const char *var_name, const char *value ) {
|
|||
syscall( UI_CVAR_SET, var_name, value );
|
||||
}
|
||||
|
||||
float trap_Cvar_VariableValue( const char *var_name ) {
|
||||
float temp;
|
||||
double trap_Cvar_VariableValue( const char *var_name ) {
|
||||
double temp;
|
||||
temp = syscall( UI_CVAR_VARIABLEVALUE, var_name );
|
||||
return temp;
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ void trap_Cvar_VariableStringBuffer( const char *var_name, char *buffer, int32_t
|
|||
syscall( UI_CVAR_VARIABLESTRINGBUFFER, var_name, buffer, bufsize );
|
||||
}
|
||||
|
||||
void trap_Cvar_SetValue( const char *var_name, float value ) {
|
||||
void trap_Cvar_SetValue( const char *var_name, double value ) {
|
||||
syscall( UI_CVAR_SETVALUE, var_name, PASSFLOAT( value ) );
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ void trap_R_AddPolyToScene( qhandle_t hShader , int32_t numVerts, const polyVert
|
|||
syscall( UI_R_ADDPOLYTOSCENE, hShader, numVerts, verts );
|
||||
}
|
||||
|
||||
void trap_R_AddLightToScene( const vec3_t org, float intensity, float r, float g, float b ) {
|
||||
void trap_R_AddLightToScene( const vec3_t org, double intensity, double r, double g, double b ) {
|
||||
syscall( UI_R_ADDLIGHTTOSCENE, org, PASSFLOAT(intensity), PASSFLOAT(r), PASSFLOAT(g), PASSFLOAT(b) );
|
||||
}
|
||||
|
||||
|
@ -140,11 +140,11 @@ void trap_R_RenderScene( const refdef_t *fd ) {
|
|||
syscall( UI_R_RENDERSCENE, fd );
|
||||
}
|
||||
|
||||
void trap_R_SetColor( const float *rgba ) {
|
||||
void trap_R_SetColor( const double *rgba ) {
|
||||
syscall( UI_R_SETCOLOR, rgba );
|
||||
}
|
||||
|
||||
void trap_R_DrawStretchPic( float x, float y, float w, float h, float s1, float t1, float s2, float t2, qhandle_t hShader ) {
|
||||
void trap_R_DrawStretchPic( double x, double y, double w, double h, double s1, double t1, double s2, double t2, qhandle_t hShader ) {
|
||||
syscall( UI_R_DRAWSTRETCHPIC, PASSFLOAT(x), PASSFLOAT(y), PASSFLOAT(w), PASSFLOAT(h), PASSFLOAT(s1), PASSFLOAT(t1), PASSFLOAT(s2), PASSFLOAT(t2), hShader );
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ void trap_UpdateScreen( void ) {
|
|||
syscall( UI_UPDATESCREEN );
|
||||
}
|
||||
|
||||
void trap_CM_LerpTag( orientation_t *tag, clipHandle_t mod, int32_t startFrame, int32_t endFrame, float frac, const char *tagName ) {
|
||||
void trap_CM_LerpTag( orientation_t *tag, clipHandle_t mod, int32_t startFrame, int32_t endFrame, double frac, const char *tagName ) {
|
||||
syscall( UI_CM_LERPTAG, tag, mod, startFrame, endFrame, PASSFLOAT(frac), tagName );
|
||||
}
|
||||
|
||||
|
|
|
@ -231,7 +231,7 @@ static void UI_TeamOrdersMenu_ListDraw( void *self ) {
|
|||
int32_t x;
|
||||
int32_t y;
|
||||
int32_t i;
|
||||
float *color;
|
||||
double *color;
|
||||
qboolean hasfocus;
|
||||
int32_t style;
|
||||
|
||||
|
|
|
@ -1849,8 +1849,8 @@ M_VideoDriverMenu_Graphics
|
|||
*/
|
||||
void M_VideoDriverMenu_Graphics (void)
|
||||
{
|
||||
float labelColor[] = { 0, 1.0, 0, 1.0 };
|
||||
float textColor[] = { 1, 1, 1, 1 };
|
||||
double labelColor[] = { 0, 1.0, 0, 1.0 };
|
||||
double textColor[] = { 1, 1, 1, 1 };
|
||||
int32_t x,y,x2;
|
||||
|
||||
UI_MenuFrame(&s_videodriver.menu);
|
||||
|
|
Loading…
Reference in a new issue