From 3694c1249d9f3f7036f8acfb28ea2ea712ba8f7c Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 7 May 2016 16:35:51 +0100 Subject: [PATCH] Don't hardcode radar blips to be green for allies, etc. --- src/battle/radar.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/battle/radar.c b/src/battle/radar.c index 3297dd9..c82c964 100644 --- a/src/battle/radar.c +++ b/src/battle/radar.c @@ -63,21 +63,17 @@ void drawRadar(void) r.x--; r.y--; - switch (e->side) + if (e->side == SIDE_NONE) { - case SIDE_ALLIES: - SDL_SetRenderDrawColor(app.renderer, 0, 255, 0, 255); - break; - - case SIDE_PIRATE: - case SIDE_PANDORAN: - case SIDE_REBEL: - SDL_SetRenderDrawColor(app.renderer, 255, 0, 0, 255); - break; - - case SIDE_NONE: - SDL_SetRenderDrawColor(app.renderer, 255, 255, 255, 255); - break; + SDL_SetRenderDrawColor(app.renderer, 255, 255, 255, 255); + } + else if (e->side == player->side) + { + SDL_SetRenderDrawColor(app.renderer, 0, 255, 0, 255); + } + else + { + SDL_SetRenderDrawColor(app.renderer, 255, 0, 0, 255); } if (e->type == ET_MINE || e->type == ET_SHADOW_MINE || e->type == ET_JUMPGATE || (e->owner && e->owner->type == ET_JUMPGATE))