From 4b9d5055bb154f133c0b94d72a14fda65ede14d1 Mon Sep 17 00:00:00 2001 From: Silvan Jegen Date: Sun, 2 Jun 2019 00:59:47 +0200 Subject: render: don't depend on tiles for player drawing We still have to decide on where the player should be able to move. At the moment, the player just ends up in the upper left corner (because we are ignoring the tile size). --- render.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/render.c b/render.c index 5f3484d..238dd5a 100644 --- a/render.c +++ b/render.c @@ -89,16 +89,16 @@ void render(SDL_Renderer* renderer, struct level_struct *currentlevel) &pixmap_crop, &destination); if (ret < 0 ) { - printf("Error (SDL): %s: %s\n", "could not render copy tiles", SDL_GetError()); + printf("Error (SDL): %s: %s\n", "could not render copy tiles", SDL_GetError()); } } } - /// Entity drawing + // Entity drawing // First of all the character get_pixmap_lemon( currentlevel->player_face, &pixmap_crop ); - destination.x = currentlevel->px * TILE_SIZE; - destination.y = currentlevel->py * TILE_SIZE; + destination.x = currentlevel->px; + destination.y = currentlevel->py; // Render onto screen SDL_RenderCopy(renderer, currentlevel->entities, -- cgit v1.2.1-18-gbd029