From 8a574acc05b0dc5c1f03829dfcbc89b137dccdb5 Mon Sep 17 00:00:00 2001 From: Julia09055x Date: Mon, 11 Dec 2023 11:19:44 +0100 Subject: [PATCH] Augen: Position korrigiert --- src/render.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/render.c b/src/render.c index 9a2bfe4..2ba6e07 100644 --- a/src/render.c +++ b/src/render.c @@ -87,21 +87,21 @@ void renderGame(){ rect.h = config.blockSizePx/4; //Höhe festlegen if (game.snake.direction == LEFT || game.snake.direction == RIGHT){ //oberes Auge - rect.x = (game.snake.headX * config.blockSizePx) + config.blockSizePx/2.5; //Abstand links + rect.x = (game.snake.headX * config.blockSizePx) + config.blockSizePx/2.5; rect.y = (game.snake.headY * config.blockSizePx) + config.blockSizePx/5; SDL_RenderFillRect(renderer, &rect); //Rechteck rendern //unteres Auge - rect.x = (game.snake.headX * config.blockSizePx) + config.blockSizePx/2.5; //Abstand links - rect.y = (game.snake.headY * config.blockSizePx) + config.blockSizePx/1.8; + rect.x = (game.snake.headX * config.blockSizePx) + config.blockSizePx/2.5; + rect.y = (game.snake.headY * config.blockSizePx) + config.blockSizePx/1.7; SDL_RenderFillRect(renderer, &rect); //Rechteck rendern } else { //linkes Auge - rect.x = (game.snake.headX * config.blockSizePx) + config.blockSizePx/5; //Abstand links + rect.x = (game.snake.headX * config.blockSizePx) + config.blockSizePx/5; rect.y = (game.snake.headY * config.blockSizePx) + config.blockSizePx/2.5; SDL_RenderFillRect(renderer, &rect); //Rechteck rendern //rechtes Auge - rect.x = (game.snake.headX * config.blockSizePx) + config.blockSizePx/1.8; //Abstand links + rect.x = (game.snake.headX * config.blockSizePx) + config.blockSizePx/1.7; //Abstand links rect.y = (game.snake.headY * config.blockSizePx) + config.blockSizePx/2.5; SDL_RenderFillRect(renderer, &rect); //Rechteck rendern }