summaryrefslogtreecommitdiff
path: root/src/tiledmap.h
blob: fb9c789ba16a07bc9016a8ed193d2a851f650b0d (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 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);

TiledMap newTiledMap(Image atlas, int tileSize, int width, int height);