home *** CD-ROM | disk | FTP | other *** search
/ Commodore Disk User Volume 3 #8 / Commodore_Disk_User_Vol.3_8_1990_-.d64 / sb.demo (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  1KB  |  56 lines

  1. 1000 rem ******* setup screen
  2. 1010 (NULL) 6:(NULL) 6:(NULL) 14
  3. 1020 (NULL):(NULL) 3:(NULL) (11,12)
  4. 1030 print "sprite basic -demo"
  5. 1040 (NULL) 15:(NULL) (10,13)
  6. 1050 print "by gordon moyes 1989"
  7. 1060 (NULL) 14:(NULL) 4
  8. 1070 rem ******* setup sprites
  9. 1080 x=24:y=50
  10. 1090 x1=0:x2=344
  11. 1100 (NULL) 0,2,160,60:(NULL) 1,2,160,120
  12. 1110 (NULL) 2,2,160,170
  13. 1120 (NULL) 3,2,160,220:(NULL) 2,4
  14. 1130 (NULL) 2,1,1,1:(NULL) 0,2,65
  15. 1140 (NULL) 0,2,0,1,0,1,5:(NULL) 0,2,1
  16. 1150 (NULL) 2,0,0,0
  17. 1160 (NULL) 0,0,0,0,0,0,11
  18. 1170 (NULL) 1,0,0,0,0,0,12
  19. 1180 (NULL) 2,0,0,0,0,0,13
  20. 1190 (NULL) 3,0,0,0,0,0,15
  21. 1200 (NULL) 0,1,1,1:(NULL) 0,0,1
  22. 1210 (NULL) 0,0,64:(NULL) 0,0,0,0
  23. 1220 (NULL) 1,1,1,1
  24. 1230 (NULL) 0,1,0,1,1,0,10
  25. 1240 (NULL) 0,1,64
  26. 1250 (NULL) 0,1,1
  27. 1260 rem ******* setup music
  28. 1270 (NULL):(NULL) 15
  29. 1280 (NULL) 0,0,0,15,0
  30. 1290 (NULL) 0,2,0,0
  31. 1300 p=0
  32. 1310 rem ******* main loop
  33. 1320 :  for i=0 to 1
  34. 1330 i=0
  35. 1340 (NULL) 0,1,x,y
  36. 1350 (NULL) (2)=a
  37. 1360 if a and 1 then y=y-4
  38. 1370 if y<50 then y=50
  39. 1380 if a and 2 then y=y+4
  40. 1390 if y>208 then y=208
  41. 1400 if a and 4 then x=x-4
  42. 1410 if x<24 then x=24
  43. 1420 if a and 8 then x=x+4
  44. 1430 if x>296 then x=296
  45. 1440 (NULL) 0,0,x1,50:(NULL) 1,0,x2,110
  46. 1450 (NULL) 2,0,x1,160:(NULL) 3,0,x2,210
  47. 1460 x1=x1+2:if x1>344 then x1=0
  48. 1470 x2=x2-2:if x2<0 then x2=344
  49. 1480 rem ******* play music
  50. 1490 (NULL) (0)=b:if b=1 then next i
  51. 1500 p=p+1:if p=5 then p=0:restore
  52. 1510 read c:read d:(NULL) 0,c,d
  53. 1520 :   next i
  54. 1530 data 8779,25,11060,12,8779,12
  55. 1540 data 11718,6,11068,12
  56.