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