map.c 3.4 KB

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