libtcod
Loading...
Searching...
No Matches
tileset.h File Reference

Tileset module. More...

#include <stddef.h>
#include "color.h"
#include "config.h"
#include "error.h"

Go to the source code of this file.

Classes

struct  TCOD_TilesetObserver
struct  TCOD_Tileset
 A container for libtcod tileset graphics. More...

Typedefs

typedef struct TCOD_Tileset TCOD_Tileset

Functions

TCOD_TilesetTCOD_tileset_new (int tile_width, int tile_height)
 Create a new tile-set with the given tile size.
void TCOD_tileset_delete (TCOD_Tileset *tileset)
 Delete a tile-set.
TCOD_TilesetTCOD_tileset_load (const char *filename, int columns, int rows, int n, const int *charmap)
 Load a PNG font as a tilesheet and return a TCOD_Tileset.
TCOD_TilesetTCOD_tileset_load_mem (size_t buffer_length, const unsigned char *buffer, int columns, int rows, int n, const int *charmap)
 Load a PNG font from memory and return a TCOD_Tileset.
TCOD_TilesetTCOD_tileset_load_raw (int width, int height, const struct TCOD_ColorRGBA *pixels, int columns, int rows, int n, const int *charmap)
 Load raw RGBA data and return a TCOD_Tileset.
int TCOD_tileset_assign_tile (struct TCOD_Tileset *tileset, int tile_id, int codepoint)
 Assign a codepoint to an existing tile based on its tile ID.
const struct TCOD_ColorRGBATCOD_tileset_get_tile (const TCOD_Tileset *tileset, int codepoint)
 Return a pointer to the tile for codepoint.
struct TCOD_TilesetObserverTCOD_tileset_observer_new (struct TCOD_Tileset *tileset)
 Return a new observer to this tileset.
void TCOD_tileset_observer_delete (struct TCOD_TilesetObserver *observer)
 Delete an existing observer.
void TCOD_tileset_notify_tile_changed (TCOD_Tileset *tileset, int tile_id)
 Called to notify any observers that a tile has been changed.
TCOD_Error TCOD_tileset_reserve (TCOD_Tileset *tileset, int desired)
 Reserve memory for a specific amount of tiles.

Detailed Description

Tileset module.