summaryrefslogtreecommitdiff
path: root/src/tiledfile.h
blob: 906bfdce827d8d3f9762872aad06bd22f9c27887 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <raylib.h>

typedef struct TiledMap {
    int width;
    int height;
    char * tilelayout;
    int tileSize;
    int atlasSize[2];
    Color * atlasData;
} TiledMap;

void textureFromPixels(Texture2D *texOut, Color *pixels, int width, int height);

void renderTilemapTexture(Texture2D *texOut, TiledMap tiledMap);

void setTiledMapTile(TiledMap tiledMap, int pos[2], char tile);

char getTiledMapTile(TiledMap tiledMap, int pos[2]);

TiledMap loadTiledMap(char * filename);