mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-15 05:41:59 +00:00
[vulkan] Correct the position of the crosshair
It's meant to be drawn at its center, not top-left corner.
This commit is contained in:
parent
8138b69186
commit
2d56d21a24
1 changed files with 3 additions and 0 deletions
|
@ -1381,7 +1381,10 @@ draw_crosshair_pic (int ch, int x, int y, vulkan_ctx_t *ctx)
|
|||
{
|
||||
drawctx_t *dctx = ctx->draw_context;
|
||||
drawframe_t *frame = &dctx->frames.a[ctx->curFrame];
|
||||
int s = 2 * ctx->twod_scale;
|
||||
|
||||
x -= CROSSHAIR_WIDTH / s + 1;
|
||||
y -= CROSSHAIR_HEIGHT / s + 1;
|
||||
byte *color = &vid.palette32[bound (0, crosshaircolor, 255) * 4];
|
||||
draw_quad (x, y, CORE_DESC, dctx->crosshair_inds[ch - 1], color, frame);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue