Added player-dead beacon
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user