From ce892407370be42479bb05e9a2faa60a297c9886 Mon Sep 17 00:00:00 2001 From: davidovski Date: Tue, 11 Jul 2023 21:37:38 +0100 Subject: make render changes on texture rather than image --- src/tiledfile.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src/tiledfile.c') diff --git a/src/tiledfile.c b/src/tiledfile.c index bf0a828..64a1e0d 100644 --- a/src/tiledfile.c +++ b/src/tiledfile.c @@ -20,17 +20,6 @@ void textureFromPixels(Texture2D *texOut, Color *pixels, int width, int height) UnloadImage(checkedIm); } -void renderTilemapTexture(Texture2D *texOut, TiledMap tiledMap) { - Color *pixels = (Color*) malloc(tiledMap.width * tiledMap.height * sizeof(Color)); - - for (int i = 0; i < tiledMap.width*tiledMap.height; i++) { - pixels[i] = (Color){ tiledMap.tilelayout[i], 0, 0, 0 }; - } - - textureFromPixels(texOut, pixels, tiledMap.width, tiledMap.height); -} - - //! read rgba image from file void readrgba(Texture2D *loc, int width, int height, FILE *file) { Color *pixels = malloc(width*height*4); -- cgit v1.2.1