diff --git a/dev/screenshots/v0.8-01.png b/dev/screenshots/v0.8-01.png index 0cf6f4b..12137fd 100644 Binary files a/dev/screenshots/v0.8-01.png and b/dev/screenshots/v0.8-01.png differ diff --git a/src/battle/ai.c b/src/battle/ai.c index 413af13..d254768 100644 --- a/src/battle/ai.c +++ b/src/battle/ai.c @@ -991,6 +991,8 @@ void checkSuspicionLevel(void) player->side = SIDE_ALLIES; addMessageBox(self->name, "Intruder alert! We have an intruder! All units, target and destroy that fighter!", MB_PANDORAN); + + addMessageBox(player->name, _("Hell! My cover's been blown, they're on to me!"), MB_IMPORTANT); } } } diff --git a/src/battle/hud.c b/src/battle/hud.c index 28dd899..fffc755 100644 --- a/src/battle/hud.c +++ b/src/battle/hud.c @@ -606,11 +606,11 @@ static void drawSuspicionLevel(void) if (battle.suspicionLevel < (MAX_SUSPICION_LEVEL * 0.5)) { - SDL_SetRenderDrawColor(app.renderer, 255, 128, 0, 255); + SDL_SetRenderDrawColor(app.renderer, 255, 255, 255, 255); } else if (battle.suspicionLevel < (MAX_SUSPICION_LEVEL * 0.75)) { - SDL_SetRenderDrawColor(app.renderer, 255, 255, 255, 255); + SDL_SetRenderDrawColor(app.renderer, 255, 128, 0, 255); } else { diff --git a/src/battle/player.c b/src/battle/player.c index a210789..6e3ecc8 100644 --- a/src/battle/player.c +++ b/src/battle/player.c @@ -36,6 +36,7 @@ static void preFireMissile(void); static void applyRestrictions(void); static int isPriorityMissionTarget(Entity *e, int dist, int closest); static int targetOutOfRange(void); +static void setPilotName(void); static int selectedPlayerIndex; static int availableGuns[BT_MAX]; @@ -77,8 +78,8 @@ void initPlayer(void) { player->selectedGunType = 0; } - - STRNCPY(player->name, "Player", MAX_NAME_LENGTH); + + setPilotName(); player->action = NULL; @@ -88,6 +89,30 @@ void initPlayer(void) player->flags |= EF_NO_HEALTH_BAR; } +static void setPilotName(void) +{ + int i, pos; + + pos = -1; + + for (i = 0 ; i < strlen(game.currentMission->pilot) ; i++) + { + if (game.currentMission->pilot[i] == ' ') + { + pos = i; + } + } + + memset(player->name, '\0', MAX_NAME_LENGTH); + + if (pos != -1) + { + memcpy(player->name, game.currentMission->pilot + pos + 1, strlen(game.currentMission->pilot) - pos - 1); + } + + SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "Pilot name = '%s'", player->name); +} + void doPlayer(void) { battle.boostTimer = MIN(battle.boostTimer + 1, BOOST_RECHARGE_TIME);