36 lines
630 B
C
36 lines
630 B
C
#ifndef BREEZE_TILESET_H
|
|
#define BREEZE_TILESET_H
|
|
|
|
#include "../defines.h"
|
|
|
|
#include <raylib.h>
|
|
|
|
typedef struct BzTilesetDesc {
|
|
const char *path;
|
|
const char *texturePath;
|
|
} BzTilesetDesc;
|
|
|
|
typedef struct BzTileset {
|
|
Texture2D tiles;
|
|
i32 startID;
|
|
i32 tileWidth;
|
|
i32 tileHeight;
|
|
i32 width;
|
|
i32 height;
|
|
i32 offsetX;
|
|
i32 offsetY;
|
|
bool isValid;
|
|
} BzTileset;
|
|
|
|
extern BzTileset BZ_TILESET_INVALID;
|
|
|
|
BzTileset bzTilesetCreate(const BzTilesetDesc *desc);
|
|
|
|
Rectangle bzTilesetGetTileRegion(BzTileset *tileset, int tileID);
|
|
|
|
void bzTilesetDestroy(BzTileset *tileset);
|
|
|
|
|
|
|
|
#endif //BREEZE_TILESET_H
|