Merge from vendor branch ZLIB:
[dragonfly.git] / games / phantasia / map.c
1 #define minusminus      plusplus
2 #define minusplus       plusminus
3
4 main()
5 {
6     /* Set up */
7
8     openpl();
9     space(-1400, -1000, 1200, 1200);
10
11     /* Big box */
12
13     move(-1400, -1000);
14     cont(-1400, 1000);
15     cont(600, 1000);
16     cont(600, -1000);
17     cont(-1400, -1000);
18
19     /* Grid -- horizontal lines every 200 */
20
21     linemod("dotted");
22     line(600, -800, -1400, -800);
23     line(-1400, -600, 600, -600);
24     line(600, -400, -1400, -400);
25     line(-1400, -200, 600, -200);
26     linemod("solid");
27     line(600, 0, -1400, 0);
28     linemod("dotted");
29     line(-1400, 200, 600, 200);
30     line(600, 400, -1400, 400);
31     line(-1400, 600, 600, 600);
32     line(600, 800, -1400, 800);
33
34     /* Grid -- vertical lines every 200 */
35
36     line(-1200, 1000, -1200, -1000);
37     line(-1000, 1000, -1000, -1000);
38     line(-800, 1000, -800, -1000);
39     line(-600, 1000, -600, -1000);
40     linemod("solid");
41     line(-400, 1000, -400, -1000);
42     linemod("dotted");
43     line(-200, 1000, -200, -1000);
44     line(0, 1000, 0, -1000);
45     line(200, 1000, 200, -1000);
46     line(400, 1000, 400, -1000);
47
48     /* Circles radius +250 on "center" */
49
50     linemod("solid");
51     circle(-400, 0, 250);
52     circle(-400, 0, 500);
53     circle(-400, 0, 750);
54     circle(-400, 0, 1000);
55
56     /* A few labels */
57
58     move(-670, 1075);
59     label("- THE PHANTASIA UNIVERSE -");
60     line(-630, 1045, -115, 1045);
61     move(-360, 80);
62     label("Lorien");
63     move(-385, -100);
64     label("Ithilien");
65     move(-560, 80);
66     label("Rohan");
67     move(-580, -100);
68     label("Anorien");
69     plusplus("Rovanion", -250, 320);
70     plusplus("The Iron Hills", -100, 560);
71     plusplus("Rhun", 250, 570);
72     minusplus("Dunland", -700, 160);
73     minusplus("Eriador", -920, 300);
74     minusplus("The Northern Waste", -1240, 320);
75     minusminus("Gondor", -720, -180);
76     minusminus("South Gondor", -940, -270);
77     minusminus("Far Harad", -1100, -500);
78     plusminus("Mordor", -180, -300);
79     plusminus("Khand", 0, -500);
80     plusminus("Near Harad", 40, -780);
81     move(340, 900);
82     label("The Moors");
83     move(300, 840);
84     label("Adventurous");
85     move(340, -840);
86     label("The Moors");
87     move(300, -900);
88     label("Adventurous");
89     move(-1340, 900);
90     label("The Moors");
91     move(-1340, 840);
92     label("Adventurous");
93     move(-1340, -840);
94     label("The Moors");
95     move(-1340, -900);
96     label("Adventurous");
97     move(700, 1000);
98     label("OUTER CIRCLES:");
99     line(690, 970, 1000, 970);
100     move(700, 900);
101     label("> 9:  The Outer Waste");
102     move(700, 800);
103     label("> 20: The Dead Marshes");
104     move(700, 700);
105     label("> 35: Kennaquhair");
106     move(700, 600);
107     label("> 55: Morannon");
108     move(700, 300);
109     label("(0,0): The Lord's Chamber");
110
111     move(700, -400);
112     label("Grid squares are 100 x 100");
113     move(700, -800);
114     label("Created by Ted Estes");
115     move(700, -860);
116     label("Plotted by Chris Robertson");
117     move(700, -920);
118     label(" c  1985");
119     circle(723, -923, 20);
120
121     /* Close down */
122
123     move(-1380, 1180);
124     closepl();
125     exit(0);
126 }
127
128 plusplus(s, x, y)       /* draw strings in plus plus quadrant */
129 char    *s;
130 int     x, y;
131 {
132 char    s1[2];
133
134     while (*s)
135         {
136         move(x, y);
137         s1[0] = *s++;
138         s1[1] = '\0';
139         label(s1);
140         x += 25;
141         y -= 30;
142         }
143 }
144
145 plusminus(s, x, y)      /* draw strings in plus minus quadrant */
146 char    *s;
147 int     x, y;
148 {
149 char    s1[2];
150
151     while (*s)
152         {
153         move(x, y);
154         s1[0] = *s++;
155         s1[1] = '\0';
156         label(s1);
157         x += 25;
158         y += 30;
159         }
160 }