diff options
author | Silvan Jegen <s.jegen@gmail.com> | 2019-06-02 00:59:47 +0200 |
---|---|---|
committer | Silvan Jegen <s.jegen@gmail.com> | 2019-06-02 00:59:47 +0200 |
commit | 4b9d5055bb154f133c0b94d72a14fda65ede14d1 (patch) | |
tree | d8a1732f6b680b93b7fd7efdbc50304a7bf47268 | |
parent | 502764740e443d05dd20e36b7928038fa9426051 (diff) |
render: don't depend on tiles for player drawing60fps
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).
-rw-r--r-- | render.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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, |