summaryrefslogtreecommitdiff
path: root/src/tiledfile.c
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-07-11 21:37:38 +0100
committerdavidovski <david@davidovski.xyz>2023-07-11 21:37:38 +0100
commitce892407370be42479bb05e9a2faa60a297c9886 (patch)
treed28da24f8f9978568cdcf2fd393e8c1bd2a7d74a /src/tiledfile.c
parentebbb6c8b0302589626a594399ec04e3c4555d5f6 (diff)
make render changes on texture rather than image
Diffstat (limited to 'src/tiledfile.c')
-rw-r--r--src/tiledfile.c11
1 files changed, 0 insertions, 11 deletions
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);