home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 68
/
068.d81
/
quadrilation
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
15KB
|
394 lines
10 gosub1010:gosub1210:gosub5000:gosub2310:gosub5200:gosub1255:gosub1410
20 m=1:p=1:m1=0:p1=0:poke53248,28:poke53249,50:poke53250,60:poke53251,50
21 poke53252,28:poke53253,70:poke53254,60:poke53255,70:poke53264,255
22 poke53287,7:poke53288,7:poke53289,7:poke53290,7:poke36856,28:poke36857,29
23 poke36858,30:poke36859,31:poke53269,15
30 ifm<>m1thenonmgosub1586,1593,1560,1510,1610,1710,1810:m1=m
40 ifp<>p1thenonpgosub1910,2010,2110,2210:p1=p
50 geta$:ifa$=""then50
60 ifa$=chr$(133)then4410
70 ifa$=chr$(135)thenm=m+1:ifm>7thenm=1
80 ifa$=chr$(136)thenp=p+1:ifp>4thenp=1
90 ifa$<>chr$(134)then30
95 poke53269,0:poke36856,s1:poke36857,s2:poke36858,s3:poke36859,s4:poke36860,s5
96 poke36861,s1:poke53287,1
100 s1=0:s2=0:lv=0:gosub2410:ps=0
105 p=int(rnd(1)*8)+1:x=19:y=9:sc=1:sq=1:gosub2910
110 lv=lv+1:gosub3010:ifps>1then130
120 gosub4010:ifps<2then110
130 gosub1275:print"[147]";:goto4410
500 s=s1:p=36641:gosub600:s=s2:p=p+33:goto600
600 v=int(s/10000):s=s-10000*v:pokep,v+73:v=int(s/1000):s=s-1000*v:pokep+1,v+73
610 v=int(s/100):s=s-100*v:pokep+2,v+73:v=int(s/10):s=s-10*v:pokep+3,v+73
620 pokep+4,s+73:return
1000 rem load font, lower mem pointers
1010 ifi=0thenpoke52,128:poke56,128:clr:i=1:load"q.fnt",8,1
1015 ifi=1theni=2:load"q.ml",8,1
1020 ml=36864:sz=256:ts=ml+sz:nx=ts+sz:pr=nx+sz:cc=pr+sz:cm=cc+sz:sx=cm+sz
1030 sy=sx+sz:cl=sy+sz:ss=cl+sz:mj=39936:return
1100 rem restore mem pointers
1110 poke52,160:poke56,160:poke53269,0:clr
1120 open15,8,15,"r0:hello connect=hello connect":input#15,er%:close15
1130 ifer%<>63thenend
1140 load"hello connect",8
1200 rem switch to alt. font
1210 poke56578,peek(56578)or3:poke56576,(peek(56576)and252)or1:poke53272,48
1220 poke648,140:poke53280,9:poke53281,9:print"[147]";
1230 poke53282,0:poke53283,12:poke53292,1:return
1250 rem switch to extended backgrounds
1255 poke53265,peek(53265)or64:poke53280,9:poke53281,9:return
1270 rem switch from extended backgrounds
1275 poke53265,peek(53265)and191:poke53280,0:poke53281,0:return
1300 rem switch to normal font
1310 poke56578,peek(56578)or3:poke56576,peek(56576)or3:poke53272,20
1320 poke648,4:poke53280,0:poke53281,0:print"[154][147]";
1330 return
1400 rem draw board
1405 print"[146]";:fori=1to9:print"@a@a@a@a@a@a@a@a@a@a@a@a@a@a@a@a@a@a@a@a";
1406 print"bcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbc";:next:return
1410 print"[147]";:poke53280,9:poke53281,9:gosub1405
1430 print"[144]stttttu[155]hfefefefefefefefefefefefeg[144]stttttu";
1440 print"[144]v[196][154][219][220][221][144][196]w[149]d[158]?>=99?=5=5=99[149]d[158]?=109?=+*9[149]d[144]v[196][154][255][223][160][144][196]w";
1450 print"[144]v[154][201][201][201][201][201][144]w[149]d[158]<d#<<76<<73<<[149]d[158]76/.<<<()'[149]d[144]v[154][201][201][201][201][201][144]w";
1460 poke140*256+20*40+9,34
1470 print"[144]xyyyyyz[149]d[158];!$;:884:8884288-,8;:8&%[149]d[144]xyyyyyz";
1480 print"@a@a@a@a@a@a@a@a@a@a@a@a@a@a@a@a@a@a@a@a";
1490 print"bcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbc";
1491 print"@a@a@a@a@a@a@a@a@a@a@a@a@a@a@a@a@a@a@a@";
1492 poke140*256+999,1:return
1500 rem draw mat 1
1510 gosub1405
1520 print"";:print"[155]dddddddddddddddddd[146]";
1522 print"[155]dddddddddddddddddd[146][195]";
1525 fori=1to6:print"[155]dddddddddddddddddd[146][193]";
1526 print"[155]dddddddddddddddddd[146][195]";
1530 next:print"[192][193][192][193][192][193][192][193][192][193][192][193][192][193][192][193][192][193]";:return
1550 rem draw mat 5
1560 gosub1405
1570 print"";:print"[155]dddddddddd[146]";
1572 print"[155]dddddddddd[146][195]";
1575 fori=1to4:print"[155]dddddddddd[146][193]";
1576 print"[155]dddddddddd[146][195]";
1580 next:print"[192][193][192][193][192][193][192][193][192][193]";:return
1585 rem draw mat 6
1586 gosub1405
1587 print"";:print"[155]dddddd[146]";
1588 print"[155]dddddd[146][195]";
1589 fori=1to3:print"[155]dddddd[146][193]";
1590 print"[155]dddddd[146][195]";
1591 next:print"[192][193][192][193][192][193]";:return
1592 rem draw mat 7
1593 gosub1405
1594 print"";:print"[155]dddddd[146]";
1595 print"[155]dddddd[146][195]";
1596 fori=1to3:print"[155]dddddd[146][193]";
1597 print"[155]dddddd[146][195]";
1598 next:print"[192][193][192][193][192][193]";:return
1600 rem draw mat 2
1610 gosub1405:print"[155]dddddddd";
1612 print"[155]dddddddddddd[146][195]";
1614 print"[155][146][192][155]dddddddddddd[146][193][192][193]";
1616 print"[155]dddddddddddddddddddd[146][195]";
1618 print"[155][146][192][155]dddddddddddddddddd[146][193][192][193]";
1620 print"[155]dddddddddddddddddd[146][195]";
1622 print"[155][146][192][155]dddddddddddddd[146][193][192][193]";
1624 print"[155]dddddddddddddd[146][195]";
1626 print"[155][146][192][155]dddddddddd[146][193][192][193]";
1628 print"[155]dddddddddd[146][195]";
1630 print"[155]dddddddddddddd";
1632 print"[155]dddddddddddddd[146][195]";
1634 print"[155]dddddddddddddddddd";
1636 print"[155]dddddddddddddddddd[146][195]";
1638 print"[155]dddddddddd[146][193][192][155]dddddddddd";
1640 print"[155]dddddd[146][195][194][195][194][195][194][195][194][155]dddddd[146][195]";
1642 print"[155]dddddd[146][193][192][193][192][155]dddddd";
1644 print"[155]dddd[146][195][194][195][194][155]dddd[146][195]";
1646 return
1700 rem draw mat 3
1710 gosub1405:print"";
1714 print"[155]dddddddddddddd";
1716 print"[155]dddddddddddddddddd";
1718 print"[155]dddddddddddddddddddddddddddd";
1720 print"[155]ddddd[146][194][195][194][155]dddddddddddddd[146][195][194][195][155]ddddd";
1722 print"[155]dddd[146][193][192][155]dddddddddddd[146][192][193][155]dddd[146][193]";
1724 print"[155]ddd[146][194][195][155]dddddddddd[146][195][194][155]ddd[146][195]";
1726 print"[155]ddd[146][192][155]dddddddddd[146][193][155]ddd[146][193]";
1728 print"[155]ddd[146][194][155]dddddddddd[146][195][155]ddd[146][195]";
1730 print"[155]ddd[146][192][155]dddddddddd[146][193][155]ddd[146][193]";
1732 print"[155]dddddddddddddddddddd[146][195]";
1734 print"[155]dddddddddddddddddddddddd[146][193]";
1736 print"[155]dddddddddddddddddddddddddddd[146][194][195]";
1738 print"[155]ddddddddd[146][192][193][192][193][192][193][192][193][155]ddddddddd[146][193][192]";
1740 print"[155]ddddddd[146][195][194][155]ddddddd[146][194][195]";
1742 print"[146][193][192][193][192][193][192][193][192][193][192][193][192][193][192]";:return
1800 rem draw mat 4
1810 gosub1405:print"";
1812 print"[155]dddddddddddddddddddd";
1814 print"[155]dddddddddddddddddddddd[146][193]";
1816 print"[155]dddddddddd[146][195][194][155]dddddddddd[146][195]";
1818 print"[155][146][192][193][192][155]ddddd[146][192][193][155]ddddd[146][193][192][193][192][193]";
1820 print"[155]dddddddddddddd";
1822 print"[155]dddddddddddddddd[146][192]