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

typedef struct TiledMap {
    int width;
    int height;
    char * tilelayout;
    int tileSize;
    int atlasSize[2];
    int tileCount;
    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);

void saveTiledMap(char * filename, TiledMap tiledMap);