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