aboutsummaryrefslogtreecommitdiff
path: root/include/strings33.h
diff options
context:
space:
mode:
authorpk33 <pk33@pk33.space>2024-11-11 18:06:18 +0100
committerpk33 <pk33@pk33.space>2024-11-11 18:06:18 +0100
commit5a54774474f43ae29716751d6415563a59b92c7d (patch)
tree151e865845b09b85992d8be20d8cc771d4110448 /include/strings33.h
parent146a683b8d8315ef15dc1c9286f0983834f48d88 (diff)
downloadengine33-5a54774474f43ae29716751d6415563a59b92c7d.tar.gz
tidying up and basic input
Diffstat (limited to 'include/strings33.h')
-rw-r--r--include/strings33.h57
1 files changed, 32 insertions, 25 deletions
diff --git a/include/strings33.h b/include/strings33.h
index c987690..5591913 100644
--- a/include/strings33.h
+++ b/include/strings33.h
@@ -1,42 +1,49 @@
-#ifndef __STRINGS_H__
-#define __STRINGS_H__
+#ifndef __STRINGS33_H__
+#define __STRINGS33_H__
-#include "types.h"
-#include "display.h"
-#include "system.h"
+#include "system33.h"
+#include "display33.h"
-#define E33_MAX_GLYPH_PLOTS 256
-#define E33_MAX_FONT_GLYPHS 256
-#define E33_FONT_DEFAULT 0
-#define E33_FONT_BIG 1
+#define _MAX_GLYPH_PLOTS 256
+#define _MAX_FONT_GLYPHS 256
-#define quprint( s, x, y, str ) e33_uprint( s, E33_FONT_DEFAULT, WHITE, x, y, str );
-#define quprintf( s, x, y, frm, ... ) e33_uprintf( s, E33_FONT_DEFAULT, WHITE, x, y, frm, ##__VA_ARGS__ );
-#define suprint( f, c, x, y, str ) e33_uprint( &__display.surface, f, c, x, y, str );
-#define suprintf( f, c, x, y, frm, ... ) e33_uprintf( &__display.surface, f, c, x, y, frm, ##__VA_ARGS__ );
-#define qsuprint( str, x, y ) e33_uprint( &__display.surface, E33_FONT_DEFAULT, WHITE, x, y, str );
-#define qsuprintf( x, y, frm, ... ) e33_uprintf( &__display.surface, E33_FONT_DEFAULT, WHITE, x, y, frm, ##__VA_ARGS__ )
+#define STRINGS33_FONT_DEFAULT 0
+#define STRINGS33_FONT_BIG 1
+
+
+#define SPRINT( s, x, y, str ) e33_uprint( s, STRINGS33_FONT_DEFAULT, WHITE, x, y, str );
+#define SPRINTF( s, x, y, frm, ... ) e33_uprintf( s, STRINGS33_FONT_DEFAULT, WHITE, x, y, frm, ##__VA_ARGS__ );
+
+#define PRINT( f, c, x, y, str ) e33_uprint( &__display.surface, f, c, x, y, str );
+#define PRINTF( f, c, x, y, frm, ... ) e33_uprintf( &__display.surface, f, c, x, y, frm, ##__VA_ARGS__ );
+
+#define QPRINT( str, x, y ) e33_uprint( &__display.surface, STRINGS33_FONT_DEFAULT, WHITE, x, y, str );
+#define QPRINTF( x, y, frm, ... ) e33_uprintf( &__display.surface, STRINGS33_FONT_DEFAULT, WHITE, x, y, frm, ##__VA_ARGS__ )
typedef struct {
- Size num_plots;
- Size width;
- u16 plots[ E33_MAX_GLYPH_PLOTS ];
+ Size plotCount;
+ Size w;
+ u16 plots[ _MAX_GLYPH_PLOTS ];
} FontGlyph33;
typedef struct {
Size xShift, yAnd;
- Size height;
- Size num_glyphs;
- Size maxGlyphWidth;
- FontGlyph33 glyphs[ E33_MAX_FONT_GLYPHS ];
+ Size h;
+ Size glyphCount;
+ Size glyphWidthMax;
+ FontGlyph33 glyphs[ _MAX_FONT_GLYPHS ];
} Font33;
-void e33_uprint( Surface *surf, Size font, u32 col, Size x, Size y, String str );
-void e33_uprintf( Surface *surf, Size font, u32 col, Size x, Size y, String fmt, ... );
+extern Font33 defFont;
+extern Font33 bigFont;
+
+
+void strings33_uprint( Surface33 *surf, Size font, u32 col, Size x, Size y, String str );
+void strings33_uprintf( Surface33 *surf, Size font, u32 col, Size x, Size y, String fmt, ... );
-#endif /* __STRING_H__ */
+#endif /* __STRINGS33_H__ */