From e6feb6f1011ec83991172b80cd9473741b6ec909 Mon Sep 17 00:00:00 2001 From: Savely Skresanov Date: Mon, 13 Aug 2012 18:44:24 +0700 Subject: [PATCH] Now stickmen and fighters show HP. Closes #93 --- src/graphics/Renderer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/graphics/Renderer.cpp b/src/graphics/Renderer.cpp index 57d4f8d96..b21e23908 100644 --- a/src/graphics/Renderer.cpp +++ b/src/graphics/Renderer.cpp @@ -1186,7 +1186,7 @@ void Renderer::render_parts() } if(pixel_mode & PSPEC_STICKMAN) { - char buff[20]; //Buffer for HP + char buff[4]; //Buffer for HP int s; int legr, legg, legb; playerst *cplayer; @@ -1199,11 +1199,11 @@ void Renderer::render_parts() else continue; -/* if (mousex>(nx-3) && mousex<(nx+3) && mousey<(ny+3) && mousey>(ny-3)) //If mous is in the head + if (mousePosX>(nx-3) && mousePosX<(nx+3) && mousePosY<(ny+3) && mousePosY>(ny-3)) //If mouse is in the head { sprintf(buff, "%3d", sim->parts[i].life); //Show HP - drawtext(mousex-8-2*(sim->parts[i].life<100)-2*(sim->parts[i].life<10), mousey-12, buff, 255, 255, 255, 255); - }*/ + drawtext(mousePosX-8-2*(sim->parts[i].life<100)-2*(sim->parts[i].life<10), mousePosY-12, buff, 255, 255, 255, 255); + } if (colour_mode!=COLOUR_HEAT) {