1 #ifndef _BRISTOL_BVG
2 #define _BRISTOL_BVG
3 
4 #define BVG_RED		0x00ff0000
5 #define BVG_GREEN	0x0000ff00
6 #define BVG_BLUE	0x000000fe
7 #define BVG_WHITE	0x00ffffff
8 #define BVG_BLACK	0x00000000
9 
10 #define BVG_TYPE_MASK	0xff00
11 #define BVG_STYLE_MASK	0x00ff
12 #define BVG_NULL	0
13 
14 #define BVG_LINE	0x100
15 #define BVG_SQUARE	0x200
16 #define BVG_STRING	0x300
17 #define BVG_VECT	0x400 // Uses string rendering using customer character
18 #define BVG_IMAGE	0x500 // Recurse
19 
20 #define VG_OPTS_MASK	0xff00
21 
22 typedef struct BvgCoords {
23 	short x, y;
24 } bvgCoords;
25 
26 typedef struct BvgVect {
27 	int count;
28 	bvgCoords *coords;
29 } bvgVect;
30 
31 // This can be line and fill
32 typedef struct BvgLine {
33 	unsigned short type;
34 	unsigned int color;
35 	unsigned short x, y, X, Y;
36 	char *nothing;
37 } bvgLine;
38 
39 typedef struct BvgString {
40 	unsigned short type;
41 	unsigned int color;
42 	unsigned short x, y, W, H;
43 	char *string;
44 } bvgString;
45 
46 typedef struct BvgVector {
47 	unsigned short type;
48 	unsigned int color;
49 	unsigned short x, y, W, H;
50 	bvgVect *vector;
51 } bvgVector;
52 
53 typedef struct BvgReimage {
54 	unsigned short type;
55 	unsigned int color;
56 	unsigned short x, y, w, h;
57 	struct BvgImage *image;
58 } bvgReimage;
59 
60 typedef struct BvgImage {
61 	int width, height;
62 	int color;
63 	int count;
64 	union {
65 		bvgLine line;
66 		bvgString string;
67 		bvgVector vector;
68 		bvgReimage image;
69 	} element[];
70 } bvgImage;
71 
72 typedef struct ImageMap {
73 	char name[1024];
74 	bvgImage *image;
75 } iMap;
76 #endif //_BRISTOL_BVG
77