Add set_tile_type, stretch_tile and free_tile

set_tile_type frees tileset memory not in use for the current tile
type (paletted or full color).
stretch_tile and free_tile support resizing tiles at run time.
This commit is contained in:
Ray Chason
2020-01-25 19:02:18 -05:00
committed by Pasi Kallinen
parent 1870e5a41b
commit b2c8d916f6
2 changed files with 136 additions and 0 deletions

View File

@@ -18,9 +18,15 @@ struct TileImage {
boolean FDECL(read_tiles, (const char *filename, BOOLEAN_P true_color));
const struct Pixel *NDECL(get_palette);
boolean FDECL(set_tile_type, (BOOLEAN_P true_color));
void NDECL(free_tiles);
const struct TileImage *FDECL(get_tile, (unsigned tile_index));
/* For resizing tiles */
struct TileImage *FDECL(stretch_tile, (const struct TileImage *,
unsigned, unsigned));
void FDECL(free_tile, (struct TileImage *));
/* Used internally by the tile set code */
struct TileSetImage {
/* Image data */