mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-12-11 21:11:08 +00:00
gl_fontedgeclamp to gl_fontinwardstep, fix gl_fontinwardstep and make it accept a float range (0-1)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2328 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
2b946b97f4
commit
2e4995fdaa
3 changed files with 13 additions and 44 deletions
|
@ -108,7 +108,7 @@ cvar_t gl_texture_anisotropic_filtering = SCVARFC("gl_texture_anisotropic_filter
|
||||||
cvar_t gl_conback = SCVARF("gl_conback", "", CVAR_RENDERERCALLBACK);
|
cvar_t gl_conback = SCVARF("gl_conback", "", CVAR_RENDERERCALLBACK);
|
||||||
cvar_t gl_font = SCVARF("gl_font", "", CVAR_RENDERERCALLBACK);
|
cvar_t gl_font = SCVARF("gl_font", "", CVAR_RENDERERCALLBACK);
|
||||||
//gl blends. Set this to 1 to stop the outside of your conchars from being visible
|
//gl blends. Set this to 1 to stop the outside of your conchars from being visible
|
||||||
cvar_t gl_fontedgeclamp = SCVAR("gl_fontedgeclamp", "0");
|
cvar_t gl_fontinwardstep = SCVAR("gl_fontinwardstep", "0");
|
||||||
cvar_t gl_smoothfont = SCVAR("gl_smoothfont", "1");
|
cvar_t gl_smoothfont = SCVAR("gl_smoothfont", "1");
|
||||||
cvar_t gl_smoothcrosshair = SCVAR("gl_smoothcrosshair", "1");
|
cvar_t gl_smoothcrosshair = SCVAR("gl_smoothcrosshair", "1");
|
||||||
#endif
|
#endif
|
||||||
|
@ -318,7 +318,7 @@ void GLRenderer_Init(void)
|
||||||
Cvar_Register (&gl_mindist, GLRENDEREROPTIONS);
|
Cvar_Register (&gl_mindist, GLRENDEREROPTIONS);
|
||||||
Cvar_Register (&vid_multisample, GLRENDEREROPTIONS);
|
Cvar_Register (&vid_multisample, GLRENDEREROPTIONS);
|
||||||
|
|
||||||
Cvar_Register (&gl_fontedgeclamp, GRAPHICALNICETIES);
|
Cvar_Register (&gl_fontinwardstep, GRAPHICALNICETIES);
|
||||||
Cvar_Register (&gl_font, GRAPHICALNICETIES);
|
Cvar_Register (&gl_font, GRAPHICALNICETIES);
|
||||||
Cvar_Register (&gl_conback, GRAPHICALNICETIES);
|
Cvar_Register (&gl_conback, GRAPHICALNICETIES);
|
||||||
Cvar_Register (&gl_smoothfont, GRAPHICALNICETIES);
|
Cvar_Register (&gl_smoothfont, GRAPHICALNICETIES);
|
||||||
|
|
|
@ -60,7 +60,7 @@ extern cvar_t gl_lerpimages;
|
||||||
extern cvar_t gl_picmip2d;
|
extern cvar_t gl_picmip2d;
|
||||||
extern cvar_t r_drawdisk;
|
extern cvar_t r_drawdisk;
|
||||||
extern cvar_t gl_compress;
|
extern cvar_t gl_compress;
|
||||||
extern cvar_t gl_smoothfont, gl_smoothcrosshair, gl_fontedgeclamp;
|
extern cvar_t gl_smoothfont, gl_smoothcrosshair, gl_fontinwardstep;
|
||||||
extern cvar_t gl_texturemode, gl_texture_anisotropic_filtering;
|
extern cvar_t gl_texturemode, gl_texture_anisotropic_filtering;
|
||||||
extern cvar_t cl_noblink;
|
extern cvar_t cl_noblink;
|
||||||
|
|
||||||
|
@ -1188,9 +1188,9 @@ void GLDraw_Character (int x, int y, unsigned int num)
|
||||||
row = num>>4;
|
row = num>>4;
|
||||||
col = num&15;
|
col = num&15;
|
||||||
|
|
||||||
frow = row*0.0625;
|
frow = row*0.0625+char_instep;
|
||||||
fcol = col*0.0625;
|
fcol = col*0.0625+char_instep;
|
||||||
size = 0.0625;
|
size = 0.0625-char_instep*2;
|
||||||
draw_mesh_xyz[0][0] = x;
|
draw_mesh_xyz[0][0] = x;
|
||||||
draw_mesh_xyz[0][1] = y;
|
draw_mesh_xyz[0][1] = y;
|
||||||
draw_mesh_st[0][0] = fcol;
|
draw_mesh_st[0][0] = fcol;
|
||||||
|
@ -1218,37 +1218,6 @@ void GLDraw_Character (int x, int y, unsigned int num)
|
||||||
GL_DrawMesh(&draw_mesh, char_tex2);
|
GL_DrawMesh(&draw_mesh, char_tex2);
|
||||||
else
|
else
|
||||||
GL_DrawMesh(&draw_mesh, char_texture);
|
GL_DrawMesh(&draw_mesh, char_texture);
|
||||||
|
|
||||||
/*#else
|
|
||||||
|
|
||||||
if (num&CON_2NDCHARSETTEXT)
|
|
||||||
GL_Bind (char_tex2);
|
|
||||||
else
|
|
||||||
GL_Bind (char_texture);
|
|
||||||
|
|
||||||
num &= 255;
|
|
||||||
|
|
||||||
row = num>>4;
|
|
||||||
col = num&15;
|
|
||||||
|
|
||||||
frow = row*0.0625+char_instep;
|
|
||||||
fcol = col*0.0625+char_instep;
|
|
||||||
size = 0.0625-char_instep*2;
|
|
||||||
qglEnable(GL_BLEND);
|
|
||||||
qglDisable(GL_ALPHA_TEST);
|
|
||||||
|
|
||||||
qglBegin (GL_QUADS);
|
|
||||||
qglTexCoord2f (fcol, frow);
|
|
||||||
qglVertex2f (x, y);
|
|
||||||
qglTexCoord2f (fcol + size, frow);
|
|
||||||
qglVertex2f (x+8, y);
|
|
||||||
qglTexCoord2f (fcol + size, frow + size);
|
|
||||||
qglVertex2f (x+8, y+8);
|
|
||||||
qglTexCoord2f (fcol, frow + size);
|
|
||||||
qglVertex2f (x, y+8);
|
|
||||||
qglEnd ();
|
|
||||||
|
|
||||||
#endif*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLDraw_FillRGB (int x, int y, int w, int h, float r, float g, float b);
|
void GLDraw_FillRGB (int x, int y, int w, int h, float r, float g, float b);
|
||||||
|
@ -2245,10 +2214,10 @@ void GL_Smoothfont_Callback(struct cvar_s *var, char *oldvalue)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GL_Fontedgeclamp_Callback(struct cvar_s *var, char *oldvalue)
|
void GL_Fontinwardstep_Callback(struct cvar_s *var, char *oldvalue)
|
||||||
{
|
{
|
||||||
if (var->value)
|
if (var->value)
|
||||||
char_instep = custom_char_instep;
|
char_instep = custom_char_instep*bound(0, var->value, 1);
|
||||||
else
|
else
|
||||||
char_instep = 0;
|
char_instep = 0;
|
||||||
}
|
}
|
||||||
|
@ -2282,7 +2251,7 @@ void GL_Font_Callback(struct cvar_s *var, char *oldvalue)
|
||||||
}
|
}
|
||||||
|
|
||||||
GL_Smoothfont_Callback(&gl_smoothfont, "");
|
GL_Smoothfont_Callback(&gl_smoothfont, "");
|
||||||
GL_Fontedgeclamp_Callback(&gl_fontedgeclamp, "");
|
GL_Fontinwardstep_Callback(&gl_fontinwardstep, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
void GL_Conback_Callback(struct cvar_s *var, char *oldvalue)
|
void GL_Conback_Callback(struct cvar_s *var, char *oldvalue)
|
||||||
|
|
|
@ -658,7 +658,7 @@ extern cvar_t gl_bump, v_contrast, r_drawflat;
|
||||||
extern cvar_t r_stains, r_stainfadetime, r_stainfadeammount;
|
extern cvar_t r_stains, r_stainfadetime, r_stainfadeammount;
|
||||||
|
|
||||||
// callback defines
|
// callback defines
|
||||||
extern cvar_t gl_conback, gl_font, gl_smoothfont, gl_fontedgeclamp, r_menutint;
|
extern cvar_t gl_conback, gl_font, gl_smoothfont, gl_fontinwardstep, r_menutint;
|
||||||
extern cvar_t vid_conautoscale, vid_conheight, vid_conwidth;
|
extern cvar_t vid_conautoscale, vid_conheight, vid_conwidth;
|
||||||
extern cvar_t crosshair, crosshairimage, crosshaircolor, r_skyboxname;
|
extern cvar_t crosshair, crosshairimage, crosshaircolor, r_skyboxname;
|
||||||
extern cvar_t r_floorcolour, r_wallcolour, r_floortexture, r_walltexture;
|
extern cvar_t r_floorcolour, r_wallcolour, r_floortexture, r_walltexture;
|
||||||
|
@ -670,7 +670,7 @@ void GLR_Menutint_Callback (struct cvar_s *var, char *oldvalue);
|
||||||
void GL_Conback_Callback (struct cvar_s *var, char *oldvalue);
|
void GL_Conback_Callback (struct cvar_s *var, char *oldvalue);
|
||||||
void GL_Font_Callback (struct cvar_s *var, char *oldvalue);
|
void GL_Font_Callback (struct cvar_s *var, char *oldvalue);
|
||||||
void GL_Smoothfont_Callback (struct cvar_s *var, char *oldvalue);
|
void GL_Smoothfont_Callback (struct cvar_s *var, char *oldvalue);
|
||||||
void GL_Fontedgeclamp_Callback (struct cvar_s *var, char *oldvalue);
|
void GL_Fontinwardstep_Callback (struct cvar_s *var, char *oldvalue);
|
||||||
void GLVID_Conwidth_Callback(struct cvar_s *var, char *oldvalue);
|
void GLVID_Conwidth_Callback(struct cvar_s *var, char *oldvalue);
|
||||||
void GLVID_Conautoscale_Callback(struct cvar_s *var, char *oldvalue);
|
void GLVID_Conautoscale_Callback(struct cvar_s *var, char *oldvalue);
|
||||||
void GLVID_Conheight_Callback(struct cvar_s *var, char *oldvalue);
|
void GLVID_Conheight_Callback(struct cvar_s *var, char *oldvalue);
|
||||||
|
@ -697,7 +697,7 @@ void GLR_DeInit (void)
|
||||||
Cvar_Unhook(&gl_conback);
|
Cvar_Unhook(&gl_conback);
|
||||||
Cvar_Unhook(&gl_font);
|
Cvar_Unhook(&gl_font);
|
||||||
Cvar_Unhook(&gl_smoothfont);
|
Cvar_Unhook(&gl_smoothfont);
|
||||||
Cvar_Unhook(&gl_fontedgeclamp);
|
Cvar_Unhook(&gl_fontinwardstep);
|
||||||
Cvar_Unhook(&vid_conautoscale);
|
Cvar_Unhook(&vid_conautoscale);
|
||||||
Cvar_Unhook(&vid_conheight);
|
Cvar_Unhook(&vid_conheight);
|
||||||
Cvar_Unhook(&vid_conwidth);
|
Cvar_Unhook(&vid_conwidth);
|
||||||
|
@ -729,7 +729,7 @@ void GLR_Init (void)
|
||||||
Cvar_Hook(&gl_conback, GL_Conback_Callback);
|
Cvar_Hook(&gl_conback, GL_Conback_Callback);
|
||||||
Cvar_Hook(&gl_font, GL_Font_Callback);
|
Cvar_Hook(&gl_font, GL_Font_Callback);
|
||||||
Cvar_Hook(&gl_smoothfont, GL_Smoothfont_Callback);
|
Cvar_Hook(&gl_smoothfont, GL_Smoothfont_Callback);
|
||||||
Cvar_Hook(&gl_fontedgeclamp, GL_Fontedgeclamp_Callback);
|
Cvar_Hook(&gl_fontinwardstep, GL_Fontinwardstep_Callback);
|
||||||
Cvar_Hook(&vid_conautoscale, GLVID_Conautoscale_Callback);
|
Cvar_Hook(&vid_conautoscale, GLVID_Conautoscale_Callback);
|
||||||
Cvar_Hook(&vid_conheight, GLVID_Conheight_Callback);
|
Cvar_Hook(&vid_conheight, GLVID_Conheight_Callback);
|
||||||
Cvar_Hook(&vid_conwidth, GLVID_Conwidth_Callback);
|
Cvar_Hook(&vid_conwidth, GLVID_Conwidth_Callback);
|
||||||
|
|
Loading…
Reference in a new issue