Added player-dead beacon

This commit is contained in:
T-moe
2016-01-30 16:37:17 +01:00
parent 9acd2010dd
commit 27d4d425d5
2 changed files with 7 additions and 0 deletions

View File

@@ -258,6 +258,11 @@ bool game_player_update(game_t* game, player_t* player, uint8_t pixels){
player->color); player->color);
break; break;
} }
if(player->state==dead) {
//Draw beacon around player pos, if player died in this round
LCD_DrawCircle(player->position.x, player->position.y,TG_PLAYER_BEACON_RADIUS,GUI_COLOR_WHITE);
}
} }
return state_changed; // return state return state_changed; // return state

View File

@@ -42,6 +42,8 @@
#define TG_HEADER_PLAYER_Y 3 //y position of the Player state-texts in the game-header #define TG_HEADER_PLAYER_Y 3 //y position of the Player state-texts in the game-header
#define TG_HEADER_PLAYER_WIDTH 100 //width of one Player state-text #define TG_HEADER_PLAYER_WIDTH 100 //width of one Player state-text
#define TG_PLAYER_BEACON_RADIUS 4 //Radius of the circle/beacon that is drawn around the players head if he dies.
//---- Section 2.2 - During an ended game (kill screen) ------------------------------------------------ //---- Section 2.2 - During an ended game (kill screen) ------------------------------------------------
//Margins of the kill screen to the display border //Margins of the kill screen to the display border
#define TG_END_TOP 180 #define TG_END_TOP 180