-
Notifications
You must be signed in to change notification settings - Fork 1
/
M20.ps
2786 lines (2781 loc) · 73.1 KB
/
M20.ps
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%!PS-Adobe-3.0
%%Pages: 1
%%EndComments
%%BeginProlog
/18xxVariant (1820) def
% ----------------------------------------------------------------------
% COPYRIGHT
% Matthias Klose ([email protected])
%
% ps18xx is "postcard" ware. If you use this code or part of this,
% you are invited to send me a nice railway postcard to the address below.
% In September 1995 I got the first and only card :-(
%
% You are allowed to use this code and to modify the source, provided
% you leave this copyright notice and the acknowledgements in it.
%
% You are allowed to include the code in your own programs, provided
% - you distribute your programs for free or for a fee, which is not
% more than DM 20,-- or $15.
% - you show the copyright notice in the same places as your own
% copyright notice,
% - you ask the users of your program to send a postcard, if they use
% this or modified code.
%
% You are not allowed to include this or derived code in any
% 18xx related program that is distributed as commercial software.
%
% Matthias Klose
% Dillgesstr. 30
% D-12249 Berlin
%
% ----------------------------------------------------------------------
% ACKNOWLEDGMENTS
% ----------------------------------------------------------------------
% Several people helped in debugging existing maps and tiles. Following
% people made contributions:
% - Paul R. Work ([email protected]) created the 1835 and 1837
% map, 1835 and 1837 specific tiles and the tile list, added bridges.
% - Nick Roworth ([email protected]) created the 1829-south map
% and debugged the 1853 and other map and tiles.
% - Steve Thomas ([email protected]) created the 1856 map and
% 1856 specific tiles and added code to print the map labels in reverse
% order.
% He reworked the code to allow sitting tiles, added port symbols and
% made the 1839 Italy, 1850 Sicily, 1870, 1825 U1 and 1899 (China) games
/cm { 28.35 mul } def
/glob-known { where dup { exch pop } if } def
/selectfont glob-known not {
/selectfont {
exch findfont exch scalefont setfont
} def
} if
/rectpath {
dup type /arraytype eq {
aload pop
} if
4 2 roll moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath
} def
/rectclip glob-known not {
/rectclip {
newpath rectpath clip newpath
} def
} if
/rectfill glob-known not {
/rectfill {
gsave
newpath rectpath fill
grestore
} def
} if
/rectstroke glob-known not {
/rectstroke {
gsave
newpath rectpath stroke
grestore
} def
} if
/rightshow {
dup stringwidth pop
4 -1 roll exch sub
3 -1 roll moveto
show
} def
/centershow {
dup stringwidth pop 2 div
4 -1 roll exch sub
3 -1 roll moveto
show
} def
/xycentershow {
dup stringwidth pop 2 div
4 -1 roll exch sub
3 1 roll
dup stringheight add 2 div neg 3 -1 roll add
exch 3 1 roll moveto
show
} def
/charheight {
gsave
newpath
0 0 moveto
false charpath
flattenpath
pathbbox
exch pop
3 -1 roll pop
grestore
} def
/stringheight {
/lly 0.0 def
/ury 0.0 def
{
( ) dup 0 4 -1 roll put
charheight
dup ury gt { /ury exch def } { pop } ifelse
dup lly lt { /lly exch def } { pop } ifelse
} forall
lly ury
} def
/toupper {
/s exch def
0 1 s length 1 sub
{
dup
/c s 3 -1 roll get def
c 97 ge c 122 le and
{ /c c 32 sub def }
if
s exch c put
} for
s
} def
/string5 6 string def
/18xx-dict 600 dict def
18xx-dict begin
/maxGeneric 850 def
/hexSide 2 cm def
/hexHeight hexSide 30 cos mul def
18xxVariant (1837) eq
18xxVariant (1854) eq
18xxVariant (1838) eq
18xxVariant (1837sx) eq
18xxVariant (1865sar) eq
18xxVariant (1880) eq
or or or or or {
/stationRadius //hexHeight 3.35 div def
} {
/stationRadius //hexHeight 2.65 div def
} ifelse
/trackWidth 6 def
/hex_x0 270 cos //hexSide mul def /hex_y0 270 sin //hexSide mul def
/hex_x1 210 cos //hexSide mul def /hex_y1 210 sin //hexSide mul def
/hex_x2 150 cos //hexSide mul def /hex_y2 150 sin //hexSide mul def
/hex_x3 90 cos //hexSide mul def /hex_y3 90 sin //hexSide mul def
/hex_x4 30 cos //hexSide mul def /hex_y4 30 sin //hexSide mul def
/hex_x5 330 cos //hexSide mul def /hex_y5 330 sin //hexSide mul def
/mtRadius 0.55 cm def
/mountain_x0 210 cos mtRadius mul def
/mountain_y0 210 sin mtRadius mul def
/mountain_x1 90 cos mtRadius mul def
/mountain_y1 90 sin mtRadius mul def
/mountain_x2 330 cos mtRadius mul def
/mountain_y2 330 sin mtRadius mul def
/mineSize //hexHeight 2.9 div def
/mineBoxX //hexHeight 2.4 div def
/mineBoxY //hexHeight 4.9 div def
/pickX //hexHeight 5.2 div def
/pickY //hexHeight 5.3 div def
/pickTopX //hexHeight 5.0 div def
/pickTopY //hexHeight 5.0 div def
/pickTopOrig //hexHeight 22.2 div def
/pickWidth 2 def
/tlGround 0 def
/tlYellow 1 def
/tlGreen 2 def
/tlBrown 3 def
/tlRusset 4 def
/tlGray 5 def
/tlRed 6 def
/tlSpecialArea 7 def
/tlCopper 8 def
/tlBlue 9 def
/tlBarr 10 def
/tlPyjama 11 def
/tlNoHex 12 def
/tlTransparent 13 def
/tlPlain 0 def
/tlWater 1 def
/tlWater2 2 def
/tlWater3 3 def
/tlMountain 4 def
/tlMountain2 5 def
/tlHill 6 def
/tlHillWater 7 def
/tlMountainWater 8 def
/tlWater4 9 def
/tlAlp 10 def
/tlAppennine 11 def
/tlPort 12 def
/tlGrass 13 def
/tlTree 14 def
/tlYucca 15 def
/tlPort2 16 def
/tlPrivate 17 def
/tlPickShovel 18 def
/stdGauge 0 def
/narrowGauge 1 def
/dualGauge 2 def
/tunnelGauge 3 def
/twinGauge 4 def
/tripleGauge 5 def
/quadGauge 6 def
/orSouthWest 0 def
/orWest 1 def
/orNorthWest 2 def
/orNorthEast 3 def
/orEast 4 def
/orSouthEast 5 def
/noStation 0 def
/valRadius 0.28 cm def
/valADist //valRadius 0.7 cm add def
/valBDist //valRadius 0.5 cm add def
/valCDist //valRadius 0.2 cm add def
/valDDist //valRadius 1.2 cm add def
/valEDist //valRadius 0.15 cm add def
/valFont { /Helvetica 10 } def
/labFDist 1.0 cm def
/labEDist 0.45 cm def
/labDDist 1.5 cm def
/labCDist 0.5 cm def
/labBDist 1.2 cm def
/labADist 0.7 cm def
/axisNormal 0 def
/axisNumBack 1 def
/axisLetBack 2 def
/axisBothBack 3 def
/axisDirection //axisNormal def
/tileSitting false def
/axesSwapped false def
/useSexavigenary false def
/TilePath {
newpath
//hex_x0 //hex_y0 moveto
//hex_x1 //hex_y1 lineto
//hex_x2 //hex_y2 lineto
//hex_x3 //hex_y3 lineto
//hex_x4 //hex_y4 lineto
//hex_x5 //hex_y5 lineto
closepath
} bind def
/MountainPath {
newpath
//mountain_x0 //mountain_y0 moveto
//mountain_x1 //mountain_y1 lineto
//mountain_x2 //mountain_y2 lineto
closepath
} bind def
/HillPath {
newpath
//mountain_x0 //mountain_y0 moveto
//mountain_x1 //mountain_y1 0.3 mul lineto
//mountain_x2 //mountain_y2 lineto
closepath
} bind def
/waveRadius 0.2 cm def
/waveHeight //waveRadius 45 cos mul def
/WaterPath {
newpath
//waveHeight -2 mul //waveHeight neg //waveRadius 135 45 arcn
0 //waveHeight //waveRadius 225 315 arc
//waveHeight 2 mul //waveHeight neg //waveRadius 135 45 arcn
} bind def
/Anchor {
gsave
2 setlinewidth
newpath
0 0 stationRadius .75 mul 240 300 arc stroke
newpath
0 stationRadius .75 mul neg moveto
0 0.375 stationRadius mul lineto stroke
newpath
0.3 stationRadius mul neg 0 moveto
0.3 stationRadius mul 0 lineto stroke
newpath
1 setlinewidth
0 stationRadius .475 mul stationRadius .1 mul 0 360 arc stroke
grestore
} def
/TileBorder {
gsave
HexPath stroke
grestore
} def
/haveColor glob-known not {
/haveColor false def
systemdict /statusdict known {
statusdict /processcolors known {
/haveColor processcolors 1 ne def
} if
} if
} if
/ColorNameTable [
(beige)
(yellow)
(green)
(brown)
(russet)
(gray)
(red)
(special)
(copper)
(blue)
(barrier)
(pyjama)
(nohex)
(transparent)
] def
haveColor {
/colorTable [
[ 1 1 1 ]
[ 1 1 0 ]
[ 0 1 0 ]
[ 0.2 0.3 0.7 ]
[ 0.5 0.35 0.25 ]
[ 0.5 0.5 0.5 ]
[ 1 0 0 ]
[ 0.5 0.5 0 ]
[ 0.28 0.55 0.8 ]
[ 0 0 0.6 ]
[ 0 0 1 ]
[ 0.3 0.3 0.3 ]
] def
/c1 { 255 div } def
/XcolorTable [
[ 245 c1 245 c1 220 c1 ]
[ 255 c1 255 c1 0 c1 ]
[ 100 c1 225 c1 100 c1 ]
[ 205 c1 102 c1 0 c1 ]
[ 238 c1 118 c1 33 c1 ]
[ 190 c1 190 c1 190 c1 ]
[ 255 c1 100 c1 100 c1 ]
[ 255 c1 228 c1 196 c1 ]
[ 238 c1 135 c1 75 c1 ]
[ 100 c1 100 c1 225 c1 ]
[ 30 c1 144 c1 255 c1 ]
[ 176 c1 48 c1 96 c1 ]
[ 255 c1 255 c1 255 c1 ]
[ 255 c1 255 c1 255 c1 ]
] def
} {
/grayTable [
1
0.97
0.9
0.7
0.7
0.5
0.4
0.99
0.8
0.5
0.3
0.3
1
1
] def
} ifelse
/TileColor {
/tileColor exch def
currentgray
tileColor //tlBarr le {
tileColor haveColor {
XcolorTable exch get
aload pop
setrgbcolor
} {
grayTable exch get
setgray
} ifelse
TilePath fill
} if
tileColor tlPyjama eq {
gsave
TilePath clip
newpath
//hexSide dup add setlinewidth
240 cos //hexHeight mul 240 sin //hexHeight mul
moveto
60 cos //hexHeight mul 60 sin //hexHeight mul
lineto
[ 0.5 cm 0.5 cm ] 0 setdash
//tlRusset haveColor {
XcolorTable exch get
aload pop
setrgbcolor
} {
grayTable exch get
setgray
} ifelse
stroke
240 cos //hexHeight mul 240 sin //hexHeight mul
moveto
60 cos //hexHeight mul 60 sin //hexHeight mul
lineto
[ 0.5 cm 0.5 cm ] 0.5 cm setdash
//tlGray haveColor {
XcolorTable exch get
aload pop
setrgbcolor
} {
grayTable exch get
setgray
} ifelse
stroke
grestore
} if
setgray
} def
/TileNumber {
gsave
/tnum exch def
/tileCodes glob-known {
/tile tileCodes tnum get def
tile 7 get
} {
tnum string5 cvs
} ifelse
0 hexSide neg translate
-30 rotate
/Helvetica 8 selectfont
-0.1 cm 0.1 cm 3 -1 roll
rightshow
grestore
} def
/StrokeTrack {
/trackType exch def
currentlinewidth
//stdGauge trackType eq {
trackWidth setlinewidth stroke
} if
//tunnelGauge trackType eq {
trackWidth setlinewidth
currentdash
[ 6 6 ] 0 setdash
stroke
setdash
} if
//narrowGauge trackType eq {
gsave
gsave
trackWidth setlinewidth stroke
grestore
1 setgray
trackWidth 0.7 mul setlinewidth stroke
grestore
trackWidth setlinewidth
currentdash
[ 6 6 ] 0 setdash
stroke
setdash
} if
//dualGauge trackType eq {
gsave
trackWidth setlinewidth stroke
grestore
currentgray 1 setgray
trackWidth 0.4 mul setlinewidth stroke
setgray
} if
//twinGauge trackType eq {
gsave
trackWidth 2.5 mul setlinewidth stroke
grestore
currentgray 1 setgray
trackWidth 0.5 mul setlinewidth stroke
setgray
} if
//tripleGauge trackType eq {
gsave
gsave
trackWidth 4 mul setlinewidth stroke
grestore
currentgray 1 setgray
trackWidth 2 mul setlinewidth stroke
setgray
grestore
trackWidth setlinewidth stroke
} if
//quadGauge trackType eq {
gsave
gsave
gsave
trackWidth 5.5 mul setlinewidth stroke
grestore
currentgray 1 setgray
trackWidth 3.5 mul setlinewidth stroke
setgray
grestore
trackWidth 2.5 mul setlinewidth stroke
grestore
currentgray 1 setgray
trackWidth 0.5 mul setlinewidth stroke
setgray
} if
setlinewidth
} def
/TunnelEntrance {
gsave
0.5 add -60 mul rotate
0 hexHeight neg translate
newpath
1 setlinewidth
0.5 setgray
//trackWidth 4 div 0 //trackWidth 2 mul 0 90 arc
//trackWidth 4 div neg 0 //trackWidth 2 mul 90 180 arc
//trackWidth 4 div //trackWidth 4 mul moveto
//trackWidth 4 div neg //trackWidth 4 mul lineto
//trackWidth 2.25 mul neg 0 moveto
//trackWidth 2.25 mul 0 lineto
fill
grestore
} def
/OffBoardTrack {
gsave
0.5 add -60 mul /trackRotation exch def
trackRotation rotate
0 hexHeight neg translate
newpath
//trackWidth 0.8 mul dup neg 0 moveto 0 lineto 0 //trackWidth 3 mul lineto
closepath fill
grestore
} def
/DividingLine {
gsave
-60 mul rotate
newpath
0 0 moveto
0 hex_y0 rlineto
1 setlinewidth
stroke
grestore
} def
/AppenninePass {
gsave
0.5 add -60 mul rotate
1 setlinewidth
newpath
-6 0 moveto
0 hexHeight 15 sub neg rlineto
-5 -5 rlineto
stroke
newpath
6 0 moveto
0 hexHeight 15 sub neg rlineto
5 -5 rlineto
stroke
grestore
} def
/AlpinePass {
gsave
0.5 add -60 mul rotate
1 setlinewidth
newpath
-8 9 hexHeight sub moveto
3 3 rlineto
10 0 rlineto
3 -3 rlineto
stroke
//trackWidth setlinewidth
newpath
0 hexHeight neg moveto
0 12 rlineto
stroke
grestore
} def
/StraightTrack {
gsave
0.5 add -60 mul /trackRotation exch def
trackRotation rotate
newpath
exch
dup 0 gt {
0 hexHeight neg moveto
0 exch hexHeight 2 mul mul rlineto
} {
0 hexHeight moveto
0 exch hexHeight 2 mul mul rlineto
} ifelse
StrokeTrack
dup 0 eq {
pop
} {
0 exch hexHeight 2 mul mul hexHeight sub translate
/currentRotation currentRotation trackRotation add def
Station
/currentRotation currentRotation trackRotation sub def
} ifelse
grestore
} def
/WideTrack {
gsave
-60 mul /trackRotation exch def
trackRotation rotate
newpath
/gaugeType exch def
hexHeight -2 mul 0 hexSide 1.5 mul
4 -1 roll dup 0 gt {
-30 exch 60 mul -30 add
} {
60 mul 30 add 30
} ifelse
arc
currentlinewidth
trackWidth setlinewidth gaugeType StrokeTrack
setlinewidth
dup 0 eq {
pop
} {
dup 0 lt { 1 add } if
hexHeight -2 mul 0 translate
60 mul -30 add dup rotate
trackRotation add /trackRotation exch def
/currentRotation currentRotation trackRotation add def
hexSide 1.5 mul 0 translate
Station
/currentRotation currentRotation trackRotation sub def
} ifelse
grestore
} def
/SharpTrack {
gsave
1 add -60 mul /trackRotation exch def
trackRotation rotate
/gaugeType exch def
newpath
0 hexSide neg hexSide 0.5 mul
4 -1 roll dup 0 gt {
30 exch 120 mul 30 add
} {
120 mul 150 add 150
} ifelse
arc
currentlinewidth
trackWidth setlinewidth gaugeType StrokeTrack
setlinewidth
dup 0 eq {
pop
} {
dup 0 lt { 1 add } if
0 hexSide neg translate
120 mul 30 add dup rotate
trackRotation add /trackRotation exch def
/currentRotation currentRotation trackRotation add def
hexSide 0.5 mul 0 translate
Station
/currentRotation currentRotation trackRotation sub def
} ifelse
grestore
} def
/Station {
dup () eq {
pop
newpath
//trackWidth -1.5 mul dup 0 moveto
neg 0 lineto
currentlinewidth //trackWidth setlinewidth stroke setlinewidth
} {
dup (£) eq {
pop
newpath
//trackWidth -1.5 mul dup 0 moveto
neg 0 lineto
currentgray
0.5 setgray
currentlinewidth //trackWidth setlinewidth stroke setlinewidth
setgray
} {
gsave
0 0 //stationRadius 0 360 arc
gsave
gsave 1 setgray fill grestore stroke
grestore
clip newpath
currentRotation neg rotate
dup (~) eq {
3 setlinewidth
//stationRadius 0.7 mul neg 0 moveto
//stationRadius 0.7 mul 0 lineto stroke
} {
/Helvetica-Bold 13 selectfont
0 0 3 -1 roll xycentershow
} ifelse
grestore
} ifelse
} ifelse
} def
/DoubleStation {
gsave
[ //stationRadius neg dup //stationRadius 2 mul dup ]
dup currentgray exch 1 setgray rectfill setgray rectstroke
//stationRadius 0 translate stationMarker Station
//stationRadius 2 mul neg 0 translate stationMarker Station
grestore
} def
/TripleInLineStation {
gsave
[ //stationRadius 2 mul neg //stationRadius -1 mul
//stationRadius 4 mul //stationRadius 2 mul ]
dup currentgray exch 1 setgray rectfill setgray rectstroke
//stationRadius 2 mul 0 translate stationMarker Station
//stationRadius 2 mul neg 0 translate stationMarker Station
//stationRadius 2 mul neg 0 translate stationMarker Station
grestore
} def
/TripleStation {
exch /r exch def
{
gsave
30 rotate
r 2 div //stationRadius add //hexHeight div dup scale
TilePath gsave 1 setgray fill grestore stroke
grestore
} if
gsave
gsave -30 rotate r 0 translate 30 rotate stationMarker Station grestore
gsave 0 r translate stationMarker Station grestore
30 rotate r neg 0 translate -30 rotate stationMarker Station
grestore
} def
/QuadrupleStation {
gsave
[ //stationRadius -1.7 mul dup //stationRadius 3.4 mul dup ]
dup currentgray exch 1 setgray rectfill setgray rectstroke
//stationRadius dup neg translate stationMarker Station
//stationRadius 2 mul neg 0 translate stationMarker Station
0 //stationRadius 2 mul translate stationMarker Station
//stationRadius 2 mul 0 translate stationMarker Station
grestore
} def
/QuintupleStation {
gsave
/sRad //stationRadius 36 sin div def
/pRad sRad //stationRadius add def
newpath
pRad 0 cos mul pRad 0 sin mul moveto
pRad 72 cos mul pRad 72 sin mul lineto
pRad 144 cos mul pRad 144 sin mul lineto
pRad 216 cos mul pRad 216 sin mul lineto
pRad 288 cos mul pRad 288 sin mul lineto
closepath
gsave
1 setgray fill
grestore
1 setlinewidth stroke
sRad 0 cos mul sRad 0 sin mul translate stationMarker Station
sRad 0 cos mul neg sRad 0 sin mul neg translate
sRad 72 cos mul sRad 72 sin mul translate stationMarker Station
sRad 72 cos mul neg sRad 72 sin mul neg translate
sRad 144 cos mul sRad 144 sin mul translate stationMarker Station
sRad 144 cos mul neg sRad 144 sin mul neg translate
sRad 216 cos mul sRad 216 sin mul translate stationMarker Station
sRad 216 cos mul neg sRad 216 sin mul neg translate
sRad 288 cos mul sRad 288 sin mul translate stationMarker Station
sRad 288 cos mul neg sRad 288 sin mul neg translate
grestore
} def
/QuincunctialStation {
gsave
[ //stationRadius -3 mul 60 sin mul
//stationRadius -3 mul 60 cos mul
//stationRadius 6 mul 60 sin mul
//stationRadius 6 mul 60 cos mul ]
dup currentgray exch 1 setgray rectfill setgray rectstroke
//stationRadius -2 mul 60 sin mul //stationRadius -2 mul 60 cos mul
translate stationMarker Station
//stationRadius 4 mul 60 sin mul 0
translate stationMarker Station
//stationRadius -2 mul 60 sin mul //stationRadius 2 mul 60 cos mul
translate stationMarker Station
//stationRadius -2 mul 60 sin mul //stationRadius 2 mul 60 cos mul
translate stationMarker Station
//stationRadius 4 mul 60 sin mul 0
translate stationMarker Station
grestore
} def
/SextupleStation {
/size exch def
gsave
/sRad //stationRadius 30 sin div size div def
/pRad sRad //stationRadius size div add def
newpath
pRad 30 cos mul pRad 30 sin mul moveto
pRad 90 cos mul pRad 90 sin mul lineto
pRad 150 cos mul pRad 150 sin mul lineto
pRad 210 cos mul pRad 210 sin mul lineto
pRad 270 cos mul pRad 270 sin mul lineto
pRad 330 cos mul pRad 330 sin mul lineto
closepath
gsave
1 setgray fill
grestore
1 setlinewidth stroke
sRad 30 cos mul sRad 30 sin mul translate stationMarker Station
sRad 30 cos mul neg sRad 30 sin mul neg translate
sRad 90 cos mul sRad 90 sin mul translate stationMarker Station
sRad 90 cos mul neg sRad 90 sin mul neg translate
sRad 150 cos mul sRad 150 sin mul translate stationMarker Station
sRad 150 cos mul neg sRad 150 sin mul neg translate
sRad 210 cos mul sRad 210 sin mul translate stationMarker Station
sRad 210 cos mul neg sRad 210 sin mul neg translate
sRad 270 cos mul sRad 270 sin mul translate stationMarker Station
sRad 270 cos mul neg sRad 270 sin mul neg translate
sRad 330 cos mul sRad 330 sin mul translate stationMarker Station
sRad 330 cos mul neg sRad 330 sin mul neg translate
grestore
} def
/BridgedTripleStation {
gsave
newpath
//stationRadius -1.25 mul //stationRadius moveto
//stationRadius 1.25 mul //stationRadius 2 mul lineto
//stationRadius 2.25 mul //stationRadius lineto
//stationRadius 2.25 mul //stationRadius neg lineto
//stationRadius 1.25 mul //stationRadius -2 mul lineto
//stationRadius -1.25 mul //stationRadius neg lineto
closepath
gsave
1 setgray fill
grestore
1 setlinewidth stroke
//stationRadius 0.25 mul //stationRadius moveto
//stationRadius 0.25 mul //stationRadius neg lineto
stroke
gsave
//stationRadius -0.25 mul 0 moveto
//stationRadius 0.25 mul 0 lineto
//trackWidth setlinewidth stroke
grestore
//stationRadius 1.25 mul //stationRadius neg
translate stationMarker Station
0 //stationRadius 2 mul
translate stationMarker Station
//stationRadius -2.5 mul //stationRadius neg
translate stationMarker Station
grestore
} def
/stationMarker {
dup mark eq { ( ) } if
} def
/SquareStation {
gsave
currentRotation neg rotate
0.5 setlinewidth
[ //stationRadius neg dup //stationRadius 2 mul dup ]
dup dup currentgray exch 1 setgray rectfill setgray rectstroke
rectclip
/Helvetica-Bold 13 selectfont
0 0 3 -1 roll xycentershow
grestore
} def
/DoubleSquareStation {
gsave
//stationRadius 0 translate stationMarker SquareStation
//stationRadius 2 mul neg 0 translate stationMarker SquareStation
grestore
} def
/MixedStation {
gsave
currentRotation neg rotate
0.5 setlinewidth
[ //stationRadius neg dup //stationRadius 2 mul dup ]
dup currentgray exch 1 setgray rectfill setgray rectstroke
newpath
//stationRadius 0 translate stationMarker SquareStation
//stationRadius 2 mul neg 0 translate stationMarker Station
grestore
} def
/TilePosition {
exch dup 12 eq {
pop pop
} {
dup 6 lt {
/len //hexHeight def
} {
/len //hexSide def
} ifelse
dup 6 mod -60 mul exch 6 lt { -30 add } if
/tpRotation exch def
tpRotation rotate
dup 0 lt {
0 exch
} {
len neg exch add 0 exch
} ifelse
translate
tpRotation neg rotate
} ifelse
} def
/NameTilePosition {
/tpWidth exch stringwidth pop 2 div def
exch dup 12 eq {
pop pop
} {
dup 6 lt {
/len //hexHeight def
} {
/len //hexSide def
} ifelse
dup 6 mod 60 mul exch 6 lt { 30 add } if
/tpRotation exch def
dup 0 ge {
len neg add
} if
dup
tpRotation cos mul /tpY exch def
tpRotation sin mul /tpX exch def
/tpLeftR
tpX tpWidth currentRotation neg cos mul sub dup mul
tpY tpWidth currentRotation neg sin mul sub dup mul add sqrt
//hexHeight 0.1 cm sub sub def
/tpRightR
tpX tpWidth currentRotation neg cos mul add dup mul
tpY tpWidth currentRotation neg sin mul add dup mul add sqrt
//hexHeight 0.1 cm sub sub def
tpLeftR 0 gt
{
tpLeftR tpRightR neg gt
{
/tpX tpX tpLeftR tpRightR sub 2 div
currentRotation neg cos mul add def
/tpY tpY tpLeftR tpRightR sub 2 div
currentRotation neg sin mul add def
} {
/tpX tpX tpLeftR currentRotation neg cos mul add def
/tpY tpY tpLeftR currentRotation neg sin mul add def
} ifelse
} {
tpRightR 0 gt
{
tpRightR tpLeftR neg gt
{
/tpX tpX tpLeftR tpRightR sub 2 div
currentRotation neg cos mul add def
/tpY tpY tpLeftR tpRightR sub 2 div
currentRotation neg sin mul add def
} {
/tpX tpX tpRightR currentRotation neg cos mul sub def
/tpY tpY tpRightR currentRotation neg sin mul sub def
} ifelse
} if
} ifelse
tpX tpY translate
} ifelse
} def
/waterWidth 2.0 def
/Terrains [
{ }
{
//waterWidth setlinewidth
WaterPath stroke
}
{
0 -0.1 cm translate
//waterWidth setlinewidth
WaterPath stroke
0 0.2 cm translate
WaterPath stroke
}
{
//waterWidth setlinewidth
WaterPath stroke
0 -0.2 cm translate
WaterPath stroke
0 0.4 cm translate
WaterPath stroke
}
{
2.2 setlinewidth
MountainPath stroke
}
{
2.2 setlinewidth
MountainPath stroke
0.6 dup scale
2.2 1 0.6 div mul setlinewidth
MountainPath stroke
}
{
2.2 setlinewidth
HillPath stroke
}
{
2.2 setlinewidth
0 0.4 cm translate