diff options
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | src/ft_draw_life_bar.c | 3 |
2 files changed, 4 insertions, 0 deletions
@@ -155,6 +155,7 @@ CFLAGS += -Wall CFLAGS += -Wextra CFLAGS += -Werror CFLAGS += -pedantic +CFLAGS += -march=ivybridge -O2 -pipe #--------------------------------------------------------------------------------------------------# ifdef DEBUG CFLAGS += ${DBG} diff --git a/src/ft_draw_life_bar.c b/src/ft_draw_life_bar.c index 25d5ebe..64d1f1f 100644 --- a/src/ft_draw_life_bar.c +++ b/src/ft_draw_life_bar.c @@ -92,6 +92,7 @@ static void int16_t y; const int16_t scl = cl->mlist.scale; + x = ((cl->mlist.map_w * scl) + 20) + (32 * scl) - ((32 * scl) / 4); y = cl->wlist.y_size - (cl->mlist.map_h * scl) - 10; while (y < (int16_t)(cl->wlist.y_size - 10)) { @@ -102,6 +103,8 @@ static void } y -= cl->wlist.y_size - (cl->mlist.map_h * scl) - 10; x -= ((cl->mlist.map_w * scl) + 20) + (32 * scl) - ((32 * scl) / 4); + y = (y == 0) ? (1) : (y); + x = (x == 0) ? (1) : (x); cl->h = y; cl->w = x; } |