librw/src/rwcharset.h

26 lines
693 B
C
Raw Normal View History

2020-04-19 09:58:53 +02:00
namespace rw {
struct Charset
{
struct Desc {
int32 count; // num of chars
int32 tileWidth, tileHeight; // chars in raster
int32 width, height; // of char
int32 width_internal, height_internal; // + border
} desc;
Raster *raster;
static bool32 open(void);
static void close(void);
2020-04-23 22:18:53 +02:00
static Charset *create(const RGBA *foreground, const RGBA *background);
2020-04-19 09:58:53 +02:00
void destroy(void);
2020-04-23 22:18:53 +02:00
Charset *setColors(const RGBA *foreground, const RGBA *background);
2020-04-19 09:58:53 +02:00
void print(const char *str, int32 x, int32 y, bool32 hideSpaces);
void printBuffered(const char *str, int32 x, int32 y, bool32 hideSpaces);
static void flushBuffer(void);
private:
void printChar(uint32 c, int32 x, int32 y);
};
}