summaryrefslogtreecommitdiff
path: root/src/rwcharset.h
diff options
context:
space:
mode:
authorclaude-bot <[email protected]>2026-07-13 12:40:03 +0000
committerclaude-bot <[email protected]>2026-07-13 12:40:03 +0000
commit847962910f0bff071f3bf07c9abb87764fb6cac3 (patch)
treeddcd429e134c7fd5f72ddc97ced175de8d66fcd0 /src/rwcharset.h
downloadlibrw-847962910f0bff071f3bf07c9abb87764fb6cac3.tar.gz
librw-847962910f0bff071f3bf07c9abb87764fb6cac3.zip
Import aap/librw @ masterHEADmaster
Snapshot for re3/reVC vendoring, per @lzcnt. Source: https://github.com/aap/librw (master).
Diffstat (limited to 'src/rwcharset.h')
-rw-r--r--src/rwcharset.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/rwcharset.h b/src/rwcharset.h
new file mode 100644
index 0000000..3988654
--- /dev/null
+++ b/src/rwcharset.h
@@ -0,0 +1,25 @@
+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);
+ static Charset *create(const RGBA *foreground, const RGBA *background);
+ void destroy(void);
+ Charset *setColors(const RGBA *foreground, const RGBA *background);
+ 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(int32 c, int32 x, int32 y);
+};
+
+}