Index: view.c
===================================================================
--- view.c (revision 2574)
+++ view.c (working copy)
@@ -3613,7 +3613,11 @@
// tweak as needed, this alters the transparency
c1.a = 140;
- drawIsoEnergyBar(Z_DIR, x, y, 1, 5, 5, w, PercentageDone, &c1, &c2);
+ if (PercentageDone > 0.05){
+ drawIsoEnergyBar(Z_DIR, x, y, 1, 5, 5, w, PercentageDone, &c1, &c2);
+ }else{
+ drawIsoEnergyBar(Z_DIR, x, y, 1, 5, 5, w, 0.05, &c1, &c2);
+ }
}
#endif
Index: hud.c
===================================================================
--- hud.c (revision 2574)
+++ hud.c (working copy)
@@ -599,7 +599,7 @@
2.5 * FontHeight(BFont_to_use);
// Width of bars
- bar_width = (text_length) * (cur_enemy->energy / Druidmap[cur_enemy->type].maxenergy);
+ bar_width = (text_length);
barc_width = (text_length) * (1.0 - cur_enemy->energy / Druidmap[cur_enemy->type].maxenergy);
if (bar_width < 0)
bar_width = 0;
@@ -618,11 +618,17 @@
}
// Draw the energy bar complement
- rect.x = bar_x + bar_width;
+ rect.x = bar_x;
rect.y = bar_y;
rect.w = barc_width;
- our_SDL_fill_rect_wrapper(Screen, &rect, SDL_MapRGB(Screen->format, 0x000, 0x000, 0x000));
+ if (barc_width < (bar_width*0.995)){
+ our_SDL_fill_rect_wrapper(Screen, &rect, SDL_MapRGB(Screen->format, 0x000, 0x000, 0x000));
+ }else{
+ rect.w = bar_width*0.005;
+ our_SDL_fill_rect_wrapper(Screen, &rect, SDL_MapRGB(Screen->format, 0x000, 0x000, 0x000));
+ }
+
// Display droid's short description text
rect.x = translate_map_point_to_screen_pixel_x(description_pos->x, description_pos->y) - text_length / 2;
PutStringFont(Screen, BFont_to_use, rect.x, rect.y, cur_enemy->short_description_text);