diff options
author | Silvan Jegen <s.jegen@gmail.com> | 2019-01-13 17:42:01 +0100 |
---|---|---|
committer | Silvan Jegen <s.jegen@gmail.com> | 2019-01-13 17:42:01 +0100 |
commit | 92a4fbb74a151038391ddc03cb48e6b567776a0d (patch) | |
tree | c936f343217561f68bf62405f0fe7aebe7fb966d /render.c | |
parent | 54bb3b30f1a625e48621a9b139127e7a2dd82561 (diff) |
Fix pixel format issues
Diffstat (limited to 'render.c')
-rw-r--r-- | render.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -87,6 +87,8 @@ void render(SDL_Renderer* renderer, struct level_struct *currentlevel, SDL_Textu /// Draw this tile onto the screen
//SDL_BlitSurface ( currentlevel->surf_tiles, &pixmap_crop, surf_screen, &destination );
+ // TODO: use pixmap_crop
+ // printf("surf_tile format: %s\n", SDL_GetPixelFormatName(currentlevel->surf_tiles->format->format));
SDL_UpdateTexture(surf_screen, &destination,
currentlevel->surf_tiles->pixels,
currentlevel->surf_tiles->pitch);
@@ -122,7 +124,7 @@ void render(SDL_Renderer* renderer, struct level_struct *currentlevel, SDL_Textu // Draw it onscreen
// SDL_BlitSurface ( currentlevel->surf_entities, &pixmap_crop, surf_screen, &destination );
- SDL_UpdateTexture(surf_screen, &destination,
+ SDL_UpdateTexture(surf_screen, &destination,
currentlevel->surf_entities->pixels,
currentlevel->surf_entities->pitch);
}
|