From 0cc3ad007879b9e0d57580f174eab2bac89bfc63 Mon Sep 17 00:00:00 2001 From: Steve Date: Wed, 11 Nov 2015 21:55:57 +0000 Subject: [PATCH] Show direction of extraction point. --- src/battle/hud.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/battle/hud.c b/src/battle/hud.c index bef5fce..c78f3cd 100644 --- a/src/battle/hud.c +++ b/src/battle/hud.c @@ -276,6 +276,20 @@ static void drawPlayerTargeter(void) blitRotated(targetPointer, x - battle.camera.x, y - battle.camera.y, angle); } + + if (battle.extractionPoint) + { + angle = getAngle(player->x, player->y, battle.extractionPoint->x, battle.extractionPoint->y); + x = player->x; + y = player->y; + + x += sin(TO_RAIDANS(angle)) * 45; + y += -cos(TO_RAIDANS(angle)) * 45; + + SDL_SetTextureColorMod(targetPointer, 255, 255, 0); + + blitRotated(targetPointer, x - battle.camera.x, y - battle.camera.y, angle); + } } static void drawTargetsRects(void)