Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 10 print"{clear}lego demo":poke53281,0:poke53280,0:gosub330:gosub 750
- 30 for t=1 to 23:printspc(29)"{cm g}":next
- 50 gosub250
- 70 gosub 110
- 80 rem print "{home}"xc,yc
- 90 goto 70
- 110 rem choose block
- 130 get a$
- 150 for t=1 to 5:if a$=i$(t) then b$=b$(t):xs=24:ys=50:l=t:gosub550:gosub 950:go=-1
- 170 next
- 190 if a$=" " then gosub 470
- 211 if a$="{return}" then gosub 1270
- 212 if not go then return
- 213 if a$="{up}" then gosub1100
- 221 if a$="{down}" then gosub1140
- 223 if a$="{left}" then gosub1180
- 225if a$="{right}" then gosub1230
- 230 return
- 250 rem print blocks on right
- 270 for t=1 to 5:print"{home}"c$(co)left$(d$,t*2)spc(37-t)b$(t)" f"right$(str$(t),len(str$(t))-1):next
- 290 printspc(31)"space{down}{left}{left}{left}{left}{left}for color"
- 300 printspc(31)"cursors{down}{left}{left}{left}{left}{left}{left}{left}to move"
- 302 print
- 305 printspc(31)"return{down}{left}{left}{left}{left}{left}{left}confirms"
- 310 return
- 330 rem presets
- 350 s$=" ":d$="{down}":fort=1to5:d$=d$+d$:s$=s$+s$:next
- 370 fort=1to8:c$(t)=mid$("{black}{white}{red}{cyan}{purple}{green}{blue}{yellow}",t,1):next
- 390 for t=1 to 5:b$(t)="{reverse on}"+left$(s$,t)+"{reverse off}":next
- 410 i$(1)="{f1}":i$(2)="{f2}":i$(3)="{f3}":i$(4)="{f4}":i$(5)="{f5}"
- 430 co=2:vic=13*4096:xs=0:ys=0:xc=0:yc=0:go=0
- 450 return
- 470 rem change colour
- 490 co=co+1:if co=9 then co=1
- 500 pokevic+39,co-1
- 530 return
- 550 rem adjust block length
- 570 if l=1 then l1=240:l2=0:l3=0:gosub 1010
- 590 if l=2 then l1=255:l2=0:l3=0:gosub 1010
- 610 if l=3 then l1=255:l2=240:l3=0:gosub 1010
- 630 if l=4 then l1=255:l2=255:l3=0:gosub 1010
- 650 if l=5 then l1=255:l2=255:l3=240:gosub 1010
- 670 return
- 750 rem sprites creation
- 770 pokevic+21,1:poke53277,1:rem double x
- 790 poke2040,192:rem set sprite 0's pointer
- 810 pokevic,xs:rem set sprite 0-1's x position
- 830 pokevic+1,ys:rem set sprite 0-1's y position
- 850 pokevic+39,co-1:rem set sprite 0's color
- 870 fort=0to63:rem byte counter with sprite loop
- 890 poke192*64+t,((t<24)*255)*(t<24):rem store the data in sprite area
- 910 next:rem close loop
- 930 return
- 950 rem move block
- 970 pokevic,xs:pokevic+1,ys
- 990 return
- 1010 rem set block lenght
- 1030 for t=0 to 7
- 1050 poke192*64+t*3,l1:poke1+192*64+t*3,l2:poke2+192*64+t*3,l3
- 1070 next
- 1080 go=-1
- 1090 return
- 1100rem up
- 1105 ys=ys-8:yc=yc-1
- 1110 if ys<50 then ys=50
- 1115 if yc<0 then yc=0
- 1120 gosub 950
- 1130 return
- 1140 rem down
- 1150 ys=ys+8:yc=yc+1
- 1155 if ys>242 then ys=242:yc=24
- 1160 gosub 950
- 1170 return
- 1180 rem left
- 1190 xs=xs-8:xc=xc-1
- 1200 if xs<24 then xs=24
- 1205 if xc<0 then xc=0
- 1210 gosub 950
- 1220 return
- 1230 rem right
- 1240 xs=xs+8:xc=xc+1
- 1245 if xs>256-l*8 then xs=256-l*8
- 1248 if xc>28 then xc=28
- 1250 gosub 950
- 1260 return
- 1270 rem place the block
- 1280 xs=0:ys=0:gosub950:l1=240:l2=0:l3=0:gosub 1010
- 1290 print"{home}"left$(d$,yc)spc(xc)c$(co)b$(l)"{home}"
- 1295 gosub430:pokevic+39,co-1
- 1298 go=0
- 1300 return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement