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