mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
[renderer] Compensate for scale in cross-hair placement
I was wondering where it had gone (south east, actually).
This commit is contained in:
parent
2a1255de59
commit
ae200e4e40
3 changed files with 9 additions and 6 deletions
|
@ -711,8 +711,9 @@ gl_Draw_Crosshair (void)
|
||||||
if ((unsigned) ch >= sizeof (crosshair_func) / sizeof (crosshair_func[0]))
|
if ((unsigned) ch >= sizeof (crosshair_func) / sizeof (crosshair_func[0]))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
x = vid.width / 2 + cl_crossx;
|
int s = 2 * gl_2d_scale;
|
||||||
y = vid.height / 2 + cl_crossy;
|
x = vid.width / s + cl_crossx;
|
||||||
|
y = vid.height / s + cl_crossy;
|
||||||
|
|
||||||
crosshair_func[ch] (x, y);
|
crosshair_func[ch] (x, y);
|
||||||
}
|
}
|
||||||
|
|
|
@ -614,9 +614,10 @@ void
|
||||||
glsl_Draw_Crosshair (void)
|
glsl_Draw_Crosshair (void)
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
|
int s = 2 * glsl_2d_scale;
|
||||||
|
|
||||||
x = vid.width / 2 + cl_crossx;
|
x = vid.width / s + cl_crossx;
|
||||||
y = vid.height / 2 + cl_crossy;
|
y = vid.height / s + cl_crossy;
|
||||||
|
|
||||||
glsl_Draw_CrosshairAt (crosshair, x, y);
|
glsl_Draw_CrosshairAt (crosshair, x, y);
|
||||||
}
|
}
|
||||||
|
|
|
@ -852,9 +852,10 @@ void
|
||||||
Vulkan_Draw_Crosshair (vulkan_ctx_t *ctx)
|
Vulkan_Draw_Crosshair (vulkan_ctx_t *ctx)
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
|
int s = 2 * ctx->twod_scale;
|
||||||
|
|
||||||
x = vid.width / 2 + cl_crossx;
|
x = vid.width / s + cl_crossx;
|
||||||
y = vid.height / 2 + cl_crossy;
|
y = vid.height / s + cl_crossy;
|
||||||
|
|
||||||
Vulkan_Draw_CrosshairAt (crosshair, x, y, ctx);
|
Vulkan_Draw_CrosshairAt (crosshair, x, y, ctx);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue