Separate engine and game
This commit is contained in:
36
game/world/tileset.h
Normal file
36
game/world/tileset.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef PIXELDEFENSE_TILESET_H
|
||||
#define PIXELDEFENSE_TILESET_H
|
||||
|
||||
#include <raylib.h>
|
||||
#include <cute_tiled.h>
|
||||
|
||||
#include "../common.h"
|
||||
|
||||
typedef struct TilesetDesc {
|
||||
cute_tiled_tileset_t *source;
|
||||
const char *assetDir;
|
||||
} TilesetDesc;
|
||||
|
||||
typedef struct Tileset {
|
||||
Texture2D tiles;
|
||||
int startID;
|
||||
int tileWidth;
|
||||
int tileHeight;
|
||||
int width;
|
||||
int height;
|
||||
int offsetX;
|
||||
int offsetY;
|
||||
bool isValid;
|
||||
} Tileset;
|
||||
|
||||
extern Tileset TILESET_INVALID;
|
||||
|
||||
Tileset tilesetCreate(const TilesetDesc *desc);
|
||||
|
||||
Rectangle tilesetGetTileRegion(Tileset *tileset, int tileID);
|
||||
|
||||
void tilesetDestroy(Tileset *tileset);
|
||||
|
||||
|
||||
|
||||
#endif //PIXELDEFENSE_TILESET_H
|
||||
Reference in New Issue
Block a user