Restructure/refactor of main.c
This commit is contained in:
@@ -11,9 +11,10 @@
|
||||
typedef struct BzTileLayer BzTileLayer;
|
||||
typedef struct BzTileObject BzTileObject;
|
||||
typedef struct BzTileObjectGroup BzTileObjectGroup;
|
||||
typedef struct BzTileMap BzTileMap;
|
||||
|
||||
typedef void (*BzTileLayerRenderFunc)(BzTileLayer *layer);
|
||||
typedef void (*BzTileObjectGroupRenderFunc)(BzTileObjectGroup *objectGroup);
|
||||
typedef void (*BzTileLayerRenderFunc)(BzTileMap *map, BzTileLayer *layer);
|
||||
typedef void (*BzTileObjectGroupRenderFunc)(BzTileMap *map, BzTileObjectGroup *objectGroup);
|
||||
|
||||
extern BzTileLayerRenderFunc BZ_TILE_LAYER_SKIP_RENDER;
|
||||
extern BzTileObjectGroupRenderFunc BZ_TILE_OBJECTS_SKIP_RENDER;
|
||||
@@ -105,8 +106,8 @@ typedef struct BzTileMap {
|
||||
extern BzTileMap BZ_TILEMAP_INVALID;
|
||||
|
||||
// Return true, if you want to override data pointer (you are responsible for cleanup, if you override)
|
||||
typedef bool (*BzTileLayerFunc)(BzTileLayer *layer, BzTile *data, i32 dataCount);
|
||||
typedef bool (*BzTileObjectsFunc)(BzTileObjectGroup *objectGroup, BzTileObject *objects, i32 objectsCount);
|
||||
typedef bool (*BzTileLayerFunc)(BzTileMap *map, BzTileLayer *layer);
|
||||
typedef bool (*BzTileObjectsFunc)(BzTileMap *map, BzTileObjectGroup *objectGroup);
|
||||
|
||||
extern BzTileLayerFunc BZ_TILE_LAYER_CLEAR;
|
||||
extern BzTileObjectsFunc BZ_TILE_OBJECTS_CLEAR;
|
||||
@@ -114,6 +115,7 @@ extern BzTileObjectsFunc BZ_TILE_OBJECTS_CLEAR;
|
||||
BzTile bzTileLayerGetTile(BzTileLayer *layer, i32 x, i32 y);
|
||||
void bzTileLayerSetTile(BzTileLayer *layer, BzTile tile, i32 x, i32 y, i32 w, i32 h);
|
||||
BzTileset *bzTileLayerGetTileset(BzTileMap *map, BzTileLayer *layer);
|
||||
BzTileset *bzTileObjectGroupGetTileset(BzTileMap *map, BzTileObjectGroup *objectGroup);
|
||||
|
||||
BzTileMap bzTileMapCreate(const BzTileMapDesc *desc);
|
||||
void bzTileMapDestroy(BzTileMap *map);
|
||||
|
||||
Reference in New Issue
Block a user