home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1991 October
/
1991-10.d64
/
worldmap64
(
.txt
)
< prev
Wrap
Commodore BASIC
|
2022-09-20
|
12KB
|
259 lines
10 rem copyright 1991 - compute publications intl ltd - all rights reserved
20 if dk=0 then dk=1:load"world.ml",8,1
30 y=int(32768/256):x=int((32768/256-y)*256+.5):poke55,x:poke56,y:clr:md=0
40 poke53280,6:poke53281,6:ox=0:oy=0:sk=200/180:restore
50 if md=1 then md=0:sys 49152+6:rem text mode
60 print"[147]":a$="[215]orld[205]ap 64":gosub 870:print
70 print"[159]":a$="[195]opyright 1991":gosub 870
80 a$="[195]ompute [208]ublications [201]ntl, [204]td":gosub 870
90 a$="[193]ll [210]ights [210]eserved":gosub 870:print:print:print"[158]"
100 ss=90:a$="[208]lease [195]hoose:":gosub 870:print
110 a$="([205])ercator [208]rojection":gosub 870
120 a$="([197])quatorial [207]rthographic [208]rojection":gosub 870
130 a$="([208])olar [207]rthographic [208]rojection":gosub 870
140 a$="([199])raphic [211]creen":gosub 870
150 a$="([211])ave [199]raphic":gosub 870:a$="([204])oad [199]raphic":gosub 870
160 get a$:if a$="" then 160
170 fl=0:b$="mepgsl"
180 for x=1 to len(b$):if a$=mid$(b$,x,1) then fl=x
190 next:if fl=0 then 160
200 on fl goto 450,230,560,900,770,810
210 rem -------------------------------
220 rem equatorial orthographic
230 print:a$="[195]enter (0-360)?":gosub 870:input cc
240 if md=0 then md=1:sys 49152+3:rem switch to the graphics screen
250 sys 49152+12:rem clear screen
260 r1=ss+127:s1=96
270 for rs=(NULL)/100 to 2*(NULL) step (NULL)/100
280 wx=r1:wy=s1:r1=127+ss*cos(rs):s1=96+ss*sin(rs)
290 x1=wx*sk+ox:y1=(wy*sk+oy)*5/6
300 x2=r1*sk+ox:y2=(s1*sk+oy)*5/6
310 gosub 960:next:r1=0:s1=0
320 read wx,wy:if wx=-1 and wy=-1 then 40
330 if wx=99 and wy=99 then n3=0:n4=0:goto 320
340 wx=wx*15-30-cc:if wx>180 then wx=wx-360
350 if wx<-180 then wx=wx+360
360 if wx>0 or wx<-180 then n3=0:n4=0:goto 320
370 gosub 410:if n3=0 and n4=0 then 400
380 x1=n1*sk+ox:y1=(n2*sk+oy)*5/6
390 x2=n3*sk+ox:y2=(n4*sk+oy)*5/6:gosub 960
400 n3=n1:n4=n2:goto320
410 ir=wx*(NULL)/180:is=wy*(NULL)/180
420 n1=cos(is)*ss*cos(ir)+127:n2=192-(ss*sin(is)+96):return
430 rem -------------------------------
440 rem mercator projection
450 ss=255/360:if md=0 then md=1:sys 49152+3
460 sys 49152+12:rem clear screen
470 read wx,wy:if wx=-1 and wy=-1 then 40
480 if wx=99 and wy=99 then r1=0:s1=0:goto 470
490 wy=192-((wy+sgn(wy)*(abs(wy/8)+abs(wy*wy/150)))/1.1*ss+96):wx=wx*15*ss
500 if r1=0 and s1=0 then 530
510 x1=r1*sk+ox:y1=(s1*sk+oy)*5/6
520 x2=wx*sk+ox:y2=(wy*sk+oy)*5/6:gosub 960
530 r1=wx:s1=wy:goto 470
540 rem -------------------------------
550 rem polar orthographic
560 print:a$="([206])orth or ([211])outh [208]ole?":gosub 870
570 gosub 1080:if a$="n" then hh=1
580 r1=ss+127:s1=96:if md=0 then md=1:sys 49152+3
590 sys 49152+12:rem clear screen
600 for rs=(NULL)/100 to 2*(NULL) step (NULL)/100
610 wx=r1:wy=s1:r1=127+ss*cos(rs):s1=96+ss*sin(rs)
620 x1=wx*sk+ox:y1=(wy*sk+oy)*5/6
630 x2=r1*sk+ox:y2=(s1*sk+oy)*5/6
640 gosub 960:next:r1=0:s1=0
650 read wx,wy:if wx=-1 and wy=-1 then 40
660 if wx=99 and wy=99 then r1=0:s1=0:goto 650
670 if hh=1 and wy<0 then r1=0:s1=0:goto 650
680 if hh=0 and wy>0 then r1=0:s1=0:goto 650
690 ri=wx*15*(NULL)/180:si=wy*(NULL)/180
700 wx=127+cos(si)*ss*sin(ri):wy=96+cos(si)*ss*cos(ri):if hh=0 then wy=191-wy
710 if r1=0 and s1=0 then 740
720 x1=r1*sk+ox:y1=(s1*sk+oy)*5/6
730 x2=wx*sk+ox:y2=(wy*sk+oy)*5/6:gosub 960
740 r1=wx:s1=wy:goto650
750 rem -------------------------------
760 rem save routine
770 if md=0 then md=1:sys 49152+3
780 sys 49152+15:goto 40
790 rem -------------------------------
800 rem load routine
810 print"[147][215]hat is the name of the picture?":input a$
820 x=len(a$):poke 53050,x:for y=1 to x:poke 53050+y,asc(mid$(a$,y,1)):next
830 if md=0 then md=1:sys 49152+3
840 sys 49152+18:goto 900
850 rem -------------------------------
860 rem center text
870 for x=1 to 20-len(a$)/2:printchr$(32);:next:printa$:return
880 rem -------------------------------
890 rem show bitmap
900 if md=0 then md=1:sys 49152+3
910 gosub 1080
920 if md=1 then md=0:print"[147]":sys 49152+6:rem text mode
930 goto 40
940 rem -------------------------------
950 rem draw line
960 x1=int(x1+.5):y1=199-int(y1+.5)
970 x2=int(x2+.5):y2=199-int(y2+.5)
980 if x1>319 or x2>319 or y1>199 or y2>199 then return
990 v(2)=int(x1/256):v(1)=int((x1/256-v(2))*256+.5)
1000 v(4)=int(y1/256):v(3)=int((y1/256-v(4))*256+.5)
1010 v(6)=int(x2/256):v(5)=int((x2/256-v(6))*256+.5)
1020 v(8)=int(y2/256):v(7)=int((y2/256-v(8))*256+.5)
1030 for y=0 to 7:poke 53000+y,v(y+1):next
1040 sys 49152+9:rem draw the line
1050 return
1060 rem -------------------------------
1070 rem wait for key
1080 get a$:if a$="" then 1080
1090 return
1100 rem geographical data
1110 data 0,25,.5,25,.75,21,.83,22,1.15,8,1.4,10,1.4,15.5,1.9,22,2
1120 data 22,2.1,23,2.16,20,2.3,19
1130 data 2.3,15.2,2.5,15.8,2.6,11,2.56,8.5,2.65,8.7,2.74
1140 data 3,2.95,1.5,2.9,6,2.7,7,2.65,11
1150 data 2.7,14,2.74,13,2.83,12.5,2.83,11,3,10.5,3,8,3.3,11.5,3.32,14,3.15,18
1160 data 3.1,20.5,3.23,22,3.38,22,3.56,23,3.65,23.5,4,25.5,4,26.5,4.13,29
1170 data 4.11,31.5,3.95,36,4.2,37.5,4.05,38,3.9,37.2,3.77,40,3.87,40,4.1,41
1180 data 4.1,39.5,4.35,40,4.35,38,4.5,38,4.44,35,4.6,36,4.6,37.5,4.54,38.5
1190 data 4.8,43,4.95,42.8,5.4,49,5.47,52,5.47,53,5.4,54,5.15,53.5,5.57
1200 data 59.7,5.95,59.5,5.97,60,6.15,59,6.32,59.7,6.3,60
1210 data 6.5,62,6.75,62.3,6.75,60.5,6.9,62
1220 data 6.9,61,6.45,56,6.5,51,6.6,52,6.67,53,6.8
1230 data 53,6.8,58,6.9,60,7.45,60,8,62.5
1240 data 7.72,65,7.9,64.6,8.05,65.5,8.25,65.8,8.5,64.8,8.5
1250 data 65.3,8.65,65.3,8.5,66.7,8.4,66.6,8.38,67.2,8.13
1260 data 68,7.4,70,7.5,68.5,7.35,68,7.28,69.5,6.7
1270 data 69.5,6.7,71,6.2,71,6,71.5,5.35,72,5.37,70,4.9,70,4.85,69,4.6
1280 data 71.5,3.5,73.5,3,72,3.5,75,3.48,76.5,3.15
1290 data 76.5,3,77.5,2.73,77,2.75,76.5,2,75.5
1300 data 1.7,74.5,1.7,74,1.47,74,1.47,73,.6,73.3,.5,71.5,.5,69,0,70,99
1310 data 99,11,69,10.45,70,9.55,71,9.15,70,9.1,69
1320 data 8.95,69,8.9,68.5,9.1,67.5,9.2,67.5,9.2
1330 data 66.5,9.07,66.5,9.05,67,8.85,66.3,8.8,66.2,8.9,65.5,9.2,65.7,9.3,66
1340 data 9.35,64.5,9.27,64.5,8.9,62,9,60.5,9.2,60
1350 data 9.25,60,9.3,60.5,9.3,58.5,9.4,59
1360 data 9.55,58.5,9.5,57,9.2,55,9,54,9.48,56,9.75,59,9.75,60,9.95,61.5,9.8
1370 data 60.5,9.8,59.3,10.2,61,10.35,61,10.4,60,10.65,59.5,10.9,58.5,11,59,11.1
1380 data 59,11.45,51.5,11.8,50.5,11.85,49.5,11.7,49.5,11.75,47,11.7,42.5
1390 data 11.77,38.5,11.85,37.5,12,35,12.2,34,12.35
1400 data 29,12.4,28.5,12.45,27,12.42,27,12.42
1410 data 27.5,12.5,25,12.55,24,12.6,22.5,12.67,23,12.55,25.5,12.4,30,12.38,32
1420 data 12.48,32,12.51,30,12.75,26,12.75,25
1430 data 12.92,22,13,19,13.3,16.5,13.6,16,13.7
1440 data 16.5,13.97,14,14,14,14.5,13,14.25,11,14.25,10.5,14.47,9,14.65,8.5
1450 data 14.77,9,14.77,8,14.8,7.5,14.82,5,14.8
1460 data 4,14.7,1,14.6,-1.5,14.7,-2,14.6,-4
1470 data 14.65,-5,14.7,-7,14.75,-9.5,14.87,-14,15.37,-17,15.3,-25,15.25,-30
1480 data 15.2,-33,15.2,-37,15.1,-38,15.05,-40.5,15.2,-40,15.1,-46,15,-46.6,15.1
1490 data -47,15.02,-48,15.06,-51.5,15.1,-51,15.15,-51.8,15.15,-52,15.4,-51
1500 data 15.35,-50.5,15.55,-48,15.6,-47.3,15.5
1510 data -46,15.5,-45.4,15.53,-45,15.6,-45,15.65
1520 data -42.5,15.7,-42.5,15.65,-43,15.62,-41.5,15.75,-41,15.8,-40.5,16.1
1530 data -39.5,16.2,-37,16.1,-36,16.05,-35,16.45
1540 data -35.5,16.55,-33,16.65,-30.5,16.75
1550 data -28,16.77,-24.5,17.1,-23,17.25,-22.5,17.4,-19,17.45,-16,17.46
1560 data -13,17.65,-7,17.6,-5.5,17.5,-3,17.1,-2.5,16.7,0
1570 data 16.6,0,16.66,1.5,16.62,1.5,16.6
1580 data 5,16.55,5.5,16.2,6,15.8,11,15.5,10.5,15.45,11.5,15.3,11.5,15.3,12.5
1590 data 14.95,11.5,14.8,9,14.77,10,14.5,10
1600 data 14.45,11,14.47,15,14.45,16,14.1,16,14.2
1610 data 17,14.25,21.5,14,21.5,13.95,19.5,13.7,19,13.6,20,13.5,23,13.55,28
1620 data 13.6,30,13.9,30,14,29,14.1,29,14,31,14.35
1630 data 31,14.4,30,14.45,30,14.47,27,14.55
1640 data 25,14.6,25,14.6,27.5,14.55,31,14.9,37.5,14.9,38.5,15.1,40,15.4,41
1650 data 15.37,41,15.34,42,15.5,44.5,15.6,46
1660 data 15.53,44.5,15.45,44,15.8,46,15.65,46,15.6
1670 data 49,15.5,48.5,15.55,49,16,49,16.1,50,16.3,50.3,16.3,52,16.2,52,16.2
1680 data 53,16,53,15.7,60,15.6,59.7,15.6,59,15.45
1690 data 59,15.45,61,15.3,61.5,14.8,62,14.8,60
1700 data 14.75,59,14.8,58,14.85,56.5,14.75,55,14.8,51.5,14.7,51.5,14.65,52.5
1710 data 14.65,55,14.3,