diff --git a/assets-cg/hud.png b/assets-cg/hud.png index 177c380..8cfaaae 100644 Binary files a/assets-cg/hud.png and b/assets-cg/hud.png differ diff --git a/assets-cg/hud_life.png b/assets-cg/hud_life.png index 7c2106b..c1087a5 100644 Binary files a/assets-cg/hud_life.png and b/assets-cg/hud_life.png differ diff --git a/assets-cg/skillicons.png b/assets-cg/skillicons.png index 74c71c3..f6aa9c1 100644 Binary files a/assets-cg/skillicons.png and b/assets-cg/skillicons.png differ diff --git a/src/render.c b/src/render.c index 50637d4..4a0ded0 100644 --- a/src/render.c +++ b/src/render.c @@ -307,6 +307,9 @@ void render_game(game_t const *g, bool show_hitboxes) /* Render skill icons */ extern bopti_image_t img_skillicons; + static const int skill_size = 23; + static const int skill_box_size = 27; + for(int i = 0; i < 6; i++) { /* Activity and cooldown */ fixed_t cooldown_total=0, cooldown_remaining=0; @@ -319,17 +322,21 @@ void render_game(game_t const *g, bool show_hitboxes) cooldown_remaining = player_f->actions_cooldown[i-1]; } - int x = 33 + 44*i + 84*(i>=3); - int y = DHEIGHT - 29; + int x = 31 + 48*i + 64*(i>=3); + int y = DHEIGHT - 33; int bg = (cooldown_remaining != 0); - dsubimage(x+2, y+2, &img_skillicons, 19*bg, 0, 19, 19, DIMAGE_NONE); - dsubimage(x+2, y+2, &img_skillicons, 19*(i+2), 0, 19, 19, DIMAGE_NONE); + dsubimage(x+2, y+2, &img_skillicons, skill_size * bg, 0, skill_size, + skill_size, DIMAGE_NONE); + dsubimage(x+2, y+2, &img_skillicons, skill_size * (i+2), 0, skill_size, + skill_size, DIMAGE_NONE); /* Darken the area representing remaining cooldown */ if(cooldown_total != 0) { - int height = (cooldown_remaining * 23) / cooldown_total; - for(int y1 = y+23-height; y1 < y + 23; y1++) { - for(int x1 = x; x1 < x+23; x1++) { + int height = (cooldown_remaining*skill_box_size) / cooldown_total; + int ymin = y + skill_box_size - height; + int ymax = y + skill_box_size; + for(int y1 = ymin; y1 < ymax; y1++) { + for(int x1 = x; x1 < x + skill_box_size; x1++) { int i = DWIDTH * y1 + x1; gint_vram[i] = ~((~gint_vram[i] & 0xf7de) >> 1); }