summaryrefslogtreecommitdiff
path: root/src/tiled.h
blob: f496dc6daba9924deb1fc564c3a81bad169d91ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <raylib.h>

#include "tiledfile.h"

typedef struct Tiled {
    float zoom;
    Vector2 offset;

    int atlasSize[2];
    int mapSize[2];

    Texture2D atlasTexture;
    Texture2D tilemapTexture;

    RenderTexture2D targetTexture;
    Shader shader; 

    int zoomLoc;
    int offsetLoc;

    int atlasSizeLoc;
    int mapSizeLoc;

    int atlasTextureLoc;
    int tilemapTextureLoc;

} Tiled;

void initTiled(Tiled *tiled, TiledMap tiledMap);
void drawTiled(Tiled *tiled);
void unloadTiled(Tiled *tiled);