]> git.sur5r.net Git - cc65/blob - include/geos/ggraph.h
- comment fixes
[cc65] / include / geos / ggraph.h
1 /*
2   GEOS graphic (non icon/menu/sprite) functions
3
4   by Maciej 'YTM/Elysium' Witkowiak
5 */
6
7 #ifndef _GGRAPH_H
8 #define _GGRAPH_H
9
10 #ifndef _GSTRUCT_H
11 #include <geos/gstruct.h>
12 #endif
13
14 void __fastcall__ cpputs(char *s);
15 void __fastcall__ cpputsxy(unsigned x, unsigned y, char *s);
16
17 void __fastcall__ SetPattern(char newpattern);
18
19 void __fastcall__ HorizontalLine(char pattern, char y, unsigned xstart, unsigned xend);
20 void __fastcall__ InvertLine(char y, unsigned xstart, unsigned xend);
21 void __fastcall__ RecoverLine(char y, unsigned xstart, unsigned xend);
22 void __fastcall__ VerticalLine(char pattern, char ystart, char yend, unsigned x);
23
24 void __fastcall__ InitDrawWindow(struct window *myRectangle);
25 void Rectangle(void);
26 void __fastcall__ FrameRectangle(char pattern);
27 void InvertRectangle(void);
28 void ImprintRectangle(void);
29 void RecoverRectangle(void);
30
31 void __fastcall__ DrawLine(char mode, struct window *topBotCoords);
32
33 void __fastcall__ DrawPoint(char mode, struct pixel *myPixel);
34 char __fastcall__ TestPoint(struct pixel *myPixel);
35
36 void __fastcall__ PutChar(char character, char y, unsigned x);
37 void __fastcall__ PutString(char *myString, char y, unsigned x);
38 void __fastcall__ PutDecimal(char style, unsigned value, char y, unsigned x);
39
40 char __fastcall__ GetCharWidth(char character);
41 void __fastcall__ LoadCharSet(struct fontdesc *myFont);
42 void UseSystemFont(void);
43
44 void __fastcall__ BitmapUp(struct iconpic *myIcon);
45 void __fastcall__ BitmapClip(char skipl, char skipr, unsigned skiptop,
46                              struct iconpic *myIcon);
47 void __fastcall__ BitOtherClip(void *proc1, void *proc2, char skipl,
48                                char skipr, unsigned skiptop,
49                                struct iconpic *myIcon);
50
51 void __fastcall__ GraphicsString(char *myGfxString);
52
53 /* VIC colour constants */
54 #define BLACK           0
55 #define WHITE           1
56 #define RED             2
57 #define CYAN            3
58 #define PURPLE          4
59 #define GREEN           5
60 #define BLUE            6
61 #define YELLOW          7
62 #define ORANGE          8
63 #define BROWN           9
64 #define LTRED           10
65 #define DKGREY          11
66 #define GREY            12
67 #define MEDGREY         12
68 #define LTGREEN         13
69 #define LTBLUE          14
70 #define LTGREY          15
71 /* once again for cc65 compatibility */
72 #define COLOR_BLACK             0x00
73 #define COLOR_WHITE             0x01
74 #define COLOR_RED               0x02
75 #define COLOR_CYAN              0x03
76 #define COLOR_VIOLET            0x04
77 #define COLOR_GREEN             0x05
78 #define COLOR_BLUE              0x06
79 #define COLOR_YELLOW            0x07
80 #define COLOR_ORANGE            0x08
81 #define COLOR_BROWN             0x09
82 #define COLOR_LIGHTRED          0x0A
83 #define COLOR_GRAY1             0x0B
84 #define COLOR_GRAY2             0x0C
85 #define COLOR_LIGHTGREEN        0x0D
86 #define COLOR_LIGHTBLUE         0x0E
87 #define COLOR_GRAY3             0x0F
88 /* VIC memory banks - lowest 2 bits of cia2base+0 */
89 #define GRBANK0         3
90 #define GRBANK1         2
91 #define GRBANK2         1
92 #define GRBANK3         0
93 /* VIC screen sizes */
94 #define VIC_X_POS_OFF   24
95 #define VIC_Y_POS_OFF   50
96 #define SC_BYTE_WIDTH   40
97 #define SC_PIX_HEIGHT   200
98 #define SC_PIX_WIDTH    320
99 #define SC_SIZE         8000
100 /* VDC screen constants */
101 #define SCREENBYTEWIDTH         80
102 #define SCREENPIXELWIDTH        640
103 /* control characters for use as numbers, not characters */
104 #define BACKSPACE       8
105 #define FORWARDSPACE    9
106 #define TAB             9
107 #define LF              10
108 #define HOME            11
109 #define PAGE_BREAK      12
110 #define UPLINE          12
111 #define CR              13
112 #define ULINEON         14
113 #define ULINEOFF        15
114 #define ESC_GRAPHICS    16
115 #define ESC_RULER       17
116 #define REV_ON          18
117 #define REV_OFF         19
118 #define GOTOX           20
119 #define GOTOY           21
120 #define GOTOXY          22
121 #define NEWCARDSET      23
122 #define BOLDON          24
123 #define ITALICON        25
124 #define OUTLINEON       26
125 #define PLAINTEXT       27
126 /* control characters for use in
127    strings: eg: str[10]=CBOLDON "Hello"; */
128 #define CCR             "\015"
129 #define CULINEON        "\016"
130 #define CULINEOFF       "\017"
131 #define CREV_ON         "\022"
132 #define CREV_OFF        "\023"
133 #define CBOLDON         "\030"
134 #define CITALICON       "\031"
135 #define COUTLINEON      "\032"
136 #define CPLAINTEXT      "\033"
137
138 /*values of currentMode */
139 /* bitNumbers */
140 #define UNDERLINE_BIT   7
141 #define BOLD_BIT        6
142 #define REVERSE_BIT     5
143 #define ITALIC_BIT      4
144 #define OUTLINE_BIT     3
145 #define SUPERSCRIPT_BIT 2
146 #define SUBSCRIPT_BIT   1
147 /* bitMasks */
148 #define SET_UNDERLINE   0x80
149 #define SET_BOLD        0x40
150 #define SET_REVERSE     0x20
151 #define SET_ITALIC      0x10
152 #define SET_OUTLINE     0x08
153 #define SET_SUPERSCRIPT 0x04
154 #define SET_SUBSCRIPT   0x02
155 #define SET_PLAINTEXT   0
156 /* values of dispBufferOn */
157 #define ST_WRGS_FORE    0x20
158 #define ST_WR_BACK      0x40
159 #define ST_WR_FORE      0x80
160 /* PutDecimal parameters */
161 /* leading zeros? */
162 #define SET_NOSURPRESS  0
163 #define SET_SURPRESS    0x40
164 /* justification */
165 #define SET_RIGHTJUST   0
166 #define SET_LEFTJUST    0x80
167 /* C128 x-extension flags */
168 #define ADD1_W          0x2000
169 #define DOUBLE_B        0x80
170 #define DOUBLE_W        0x8000
171 /* DrawLine/DrawPoint mode values */
172 #define DRAW_ERASE      0x00
173 #define DRAW_DRAW       0x40
174 #define DRAW_COPY       0x80
175
176 typedef void graphicStr;
177
178 #define MOVEPENTO(x,y) (char)1, (unsigned)(x), (char)(y)
179 #define LINETO(x,y) (char)2, (unsigned)(x), (char)(y)
180 #define RECTANGLETO(x,y) (char)3, (unsigned)(x), (char)(y)
181 #define NEWPATTERN(p) (char)5, (char)(p)
182 #define FRAME_RECTO(x,y) (char)7, (unsigned)(x), (char)(y)
183 #define PEN_X_DELTA(x) (char)8, (unsigned)(x)
184 #define PEN_Y_DELTA(y) (char)9, (char)(y)
185 #define PEN_XY_DELTA(x,y) (char)10, (unsigned)(x), (char)(y)
186 #define GSTR_END (char)NULL
187 /* ESC_PUTSTRING can't be implemented - it needs text, not pointer to it
188    #define ESC_PUTSTRING(x,y,text) (char)6, (unsigned)(x), (char)(y), (text), (char)NULL
189 */
190
191 #endif