rearrange GUI for future combo counter
This commit is contained in:
parent
4289ce3581
commit
27810b1ea0
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 8.2 KiB |
12
src/render.c
12
src/render.c
|
@ -591,9 +591,9 @@ void render_game(game_t const *g, bool show_hitboxes)
|
|||
extern font_t font_hud;
|
||||
player_data_t *player_data = player_f->player;
|
||||
dfont(&font_hud);
|
||||
dprint_opt(349, HUD_Y - 5, RGB24(0x15171a), C_NONE, DTEXT_CENTER,
|
||||
dprint_opt(164, HUD_Y - 5, RGB24(0x15171a), C_NONE, DTEXT_CENTER,
|
||||
DTEXT_TOP, "%d", player_data->xp_level);
|
||||
dprint_opt(349, HUD_Y - 6, RGB24(0xabb1ba), C_NONE, DTEXT_CENTER,
|
||||
dprint_opt(164, HUD_Y - 6, RGB24(0xabb1ba), C_NONE, DTEXT_CENTER,
|
||||
DTEXT_TOP, "%d", player_data->xp_level);
|
||||
dfont(&font_rogue);
|
||||
|
||||
|
@ -607,14 +607,14 @@ void render_game(game_t const *g, bool show_hitboxes)
|
|||
/* Render XP bar. The following values indicate the geometry of the XP bar
|
||||
so that we can show a partially-filled version of it */
|
||||
if(anim_in(g->hud_xp_anim.frame, &anims_hud_xp_Explode, 0)) {
|
||||
anim_frame_render(343, HUD_Y-32, g->hud_xp_anim.frame);
|
||||
anim_frame_render(158, HUD_Y-32, g->hud_xp_anim.frame);
|
||||
}
|
||||
else {
|
||||
static int const XP_FULL=22;
|
||||
int xp_current = player_data->xp_current;
|
||||
int xp_total = max(player_data->xp_to_next_level, 1);
|
||||
int fill_height = XP_FULL * xp_current / xp_total;
|
||||
anim_frame_subrender(343, HUD_Y-32, g->hud_xp_anim.frame,
|
||||
anim_frame_subrender(158, HUD_Y-32, g->hud_xp_anim.frame,
|
||||
0, XP_FULL - fill_height, -1, fill_height);
|
||||
}
|
||||
|
||||
|
@ -627,7 +627,7 @@ void render_game(game_t const *g, bool show_hitboxes)
|
|||
fixed_t cooldown_remaining = player_f->actions_cooldown[i+1];
|
||||
int skill = player_f->skills[i+1];
|
||||
|
||||
int x = 31 + 48*i + 64*(i>=3);
|
||||
int x = 23 + 44*i + 103*(i>=3);
|
||||
int y = HUD_Y - 33;
|
||||
int bg = (cooldown_remaining != 0) ? 2 : 1;
|
||||
skill_render(x+2, y+2, skill, bg, C_WHITE);
|
||||
|
@ -745,7 +745,7 @@ void render_game(game_t const *g, bool show_hitboxes)
|
|||
for(int i = 0; i < 5; i++) {
|
||||
int s1 = player_f->skills[i+1], s2 = switched_skills[i+1];
|
||||
if(s1 == s2) continue;
|
||||
int x = 31 + 48*i + 64*(i>=3);
|
||||
int x = 23 + 44*i + 103*(i>=3);
|
||||
int y = HUD_Y - 33;
|
||||
skill_render(x+2, y+2, s2, 3, C_WHITE);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue