]> git.wh0rd.org Git - ICEs.git/blob - 130161/ice.i
initial import
[ICEs.git] / 130161 / ice.i
1 struct displayfuncs {
2         void (*init) ();
3 } funcs;
4 struct gpsdisplay {
5         struct displayfuncs *funcs;
6 };
7 static void PSMyArc(double cx, double cy, double radx, double rady, double sa,
8                     double ta)
9 {
10         double ea;
11         double temp;
12         ea = sa + ta;
13         while (sa < ea) {
14                 temp = ((sa + 90) / 90) * 90;
15                 PSDoArc(cx, sa, ea < temp ? ea : temp);
16                 sa = temp;
17         }
18 }
19 static void PSDrawElipse()
20 {
21         float cx;
22         float cy;
23         float radx;
24         float rady;
25         if (radx != rady)
26                 PSMyArc(cx, cy, radx, rady, 0, 360);
27 }
28 static void PSDrawFillCircle()
29 {
30         PSDrawElipse();
31 }
32 static struct displayfuncs psfuncs[] = {
33         PSDrawFillCircle
34 };
35 void _GPSDraw_CreateDisplay()
36 {
37         struct gpsdisplay *gdisp;
38         gdisp->funcs = (void *)&psfuncs;
39 }