1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#ifndef __STRINGS33_H__
#define __STRINGS33_H__
#include "system33.h"
#include "display33.h"
#define _MAX_GLYPH_PLOTS 256
#define _MAX_FONT_GLYPHS 256
#define STRINGS33_FONT_DEFAULT 0
#define STRINGS33_FONT_BIG 1
#define SPRINT( s, x, y, str ) strings33_uprint( s, STRINGS33_FONT_DEFAULT, WHITE, x, y, str );
#define SPRINTF( s, x, y, frm, ... ) strings33_uprintf( s, STRINGS33_FONT_DEFAULT, WHITE, x, y, frm, ##__VA_ARGS__ );
#define PRINT( f, c, x, y, str ) strings33_uprint( &__display.surface, f, c, x, y, str );
#define PRINTF( f, c, x, y, frm, ... ) strings33_uprintf( &__display.surface, f, c, x, y, frm, ##__VA_ARGS__ );
#define QPRINT( str, x, y ) strings33_uprint( &__display.surface, STRINGS33_FONT_DEFAULT, WHITE, x, y, str );
#define QPRINTF( x, y, frm, ... ) strings33_uprintf( &__display.surface, STRINGS33_FONT_DEFAULT, WHITE, x, y, frm, ##__VA_ARGS__ )
typedef struct {
Size plotCount;
Size w;
u16 plots[ _MAX_GLYPH_PLOTS ];
} FontGlyph33;
typedef struct {
Size xShift, yAnd;
Size h;
Size glyphCount;
Size glyphWidthMax;
FontGlyph33 glyphs[ _MAX_FONT_GLYPHS ];
} Font33;
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 /* __STRINGS33_H__ */
|