Added EF_FRIENDLY_HEALTH_BAR.

This commit is contained in:
Steve 2016-04-26 10:43:43 +01:00
parent c5cc733957
commit 0bb7ce2591
3 changed files with 4 additions and 2 deletions

View File

@ -432,7 +432,7 @@ static void drawHealthBar(Entity *e)
r.w = 32; r.w = 32;
r.h = 1; r.h = 1;
if (e->side == SIDE_ALLIES) if (e->side == SIDE_ALLIES || e->flags & EF_FRIENDLY_HEALTH_BAR)
{ {
SDL_SetRenderDrawColor(app.renderer, 0, 128, 0, 255); SDL_SetRenderDrawColor(app.renderer, 0, 128, 0, 255);
} }
@ -445,7 +445,7 @@ static void drawHealthBar(Entity *e)
r.w = 32 * (e->health * 1.0f / e->maxHealth); r.w = 32 * (e->health * 1.0f / e->maxHealth);
if (e->side == SIDE_ALLIES) if (e->side == SIDE_ALLIES || e->flags & EF_FRIENDLY_HEALTH_BAR)
{ {
SDL_SetRenderDrawColor(app.renderer, 0, 255, 0, 255); SDL_SetRenderDrawColor(app.renderer, 0, 255, 0, 255);
} }

View File

@ -105,6 +105,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define EF_AI_IGNORE (2 << 19) #define EF_AI_IGNORE (2 << 19)
#define EF_NON_SOLID (2 << 20) #define EF_NON_SOLID (2 << 20)
#define EF_NO_HEALTH_BAR (2 << 21) #define EF_NO_HEALTH_BAR (2 << 21)
#define EF_FRIENDLY_HEALTH_BAR (2 << 22)
#define AIF_NONE 0 #define AIF_NONE 0
#define AIF_FOLLOWS_PLAYER (2 << 0) #define AIF_FOLLOWS_PLAYER (2 << 0)

View File

@ -65,6 +65,7 @@ void initLookups(void)
addLookup("EF_AI_LEADER", EF_AI_LEADER); addLookup("EF_AI_LEADER", EF_AI_LEADER);
addLookup("EF_NO_KILL_INC", EF_NO_KILL_INC); addLookup("EF_NO_KILL_INC", EF_NO_KILL_INC);
addLookup("EF_NO_MT_BOX", EF_NO_MT_BOX); addLookup("EF_NO_MT_BOX", EF_NO_MT_BOX);
addLookup("EF_FRIENDLY_HEALTH_BAR", EF_FRIENDLY_HEALTH_BAR);
addLookup("AIF_NONE", AIF_NONE); addLookup("AIF_NONE", AIF_NONE);
addLookup("AIF_MOVES_TO_PLAYER", AIF_MOVES_TO_PLAYER); addLookup("AIF_MOVES_TO_PLAYER", AIF_MOVES_TO_PLAYER);