Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

align modern hud closer to the remaster and render keys for hipnotic as well #764

Merged
merged 3 commits into from
Jan 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions Quake/sbar.c
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,6 @@ static void Sbar_DrawModern (cb_context_t *cbx)
Sbar_DrawFace (cbx, 20, 135, false);
Sbar_DrawNum (cbx, 45, 135, cl.stats[STAT_HEALTH], 3, cl.stats[STAT_HEALTH] <= 25);

if (scr_viewsize.value < 110.0f)
{
// armor
const int ARMOR_NUM_X = 45;
Expand Down Expand Up @@ -1104,15 +1103,20 @@ static void Sbar_DrawModern (cb_context_t *cbx)
}
}

if (scr_viewsize.value < 110.0f)
{
const int KEY_ICON_X = 284;
const int KEY_ICON_Y = 115;
const int KEY_ICON_HIPNOTIC_Y = 122;
// keys
for (int i = 0; i < 2; i++)
{
if (cl.items & (1 << (17 + i)) && (!hipnotic || (i > 1)))
Sbar_DrawPic (cbx, KEY_ICON_X, KEY_ICON_Y - (i * 16), sb_items[i]);
if (cl.items & (1 << (17 + i)))
{
if (!hipnotic)
Sbar_DrawPic (cbx, KEY_ICON_X, KEY_ICON_Y - (i * 16), sb_items[i]);
else
Sbar_DrawPic (cbx, KEY_ICON_X, KEY_ICON_HIPNOTIC_Y - (i * 10), sb_items[i]);
}
}
}

Expand Down
Loading