home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1994 August / 1994-08b.d64 / animator (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  5KB  |  121 lines

  1. 5 rem copyright 1994 - compute publications intl ltd - all rights reserved
  2. 10 rem ---===*** setup ***===---
  3. 20 data 9,1,8,9,10,11,12,13,14,15
  4. 30 data 12,0,1,2,3,8,9,10,11,12,13,14,15
  5. 40 data 4,0,1,2,3
  6. 50 poke 56,32:poke 52,32:clr:poke 53280,6:poke 53281,0:print"[159]":
  7. 60 dim b(25),s(25),sc(25):c=0
  8. 70 for b=1 to 3:read n:for x=1 to n
  9. 80 read y:s(c)=y*16:b(c)=4-b:sc(c)=((b-1)*16384+s(c)*64)/256:c=c+1:next:next
  10. 90 data 169,0,133,251,133,253,169,208,133,252,169,80,133,254,160,0,177,251
  11. 100 data 145,253,200,208,249,230,252,230,254,169,96,197,254,208,239,96
  12. 110 for x=0 to 33:read y:poke 49152+x,y:next
  13. 120 poke 56334,peek(56334) and 254:poke 1,peek(1) and 251:sys49152
  14. 130 poke 1,peek(1) or 4:poke 56334,peek(56334) or 1
  15. 140 data 169,3,13,2,221,141,2,221,169,252,45,0,221,5,251,168,169,15,45,24,208
  16. 150 data 5,252,170,165,253,140,0,221,142,24,208,141,136,2,169,19,32,210,255,96
  17. 160 for x=0 to 40:read y:poke 49152+x,y:next
  18. 170 data 165,252,170,232,232,232,232,134,2,160,0,177,251,145,253,200,208,249
  19. 180 data 230,252,230,254,165,2,197,252,208,239,96
  20. 190 for x=0 to 28:read y:poke 50000+x,y:next
  21. 200 for x=1 to 24:poke 251,b(x):poke 252,s(x):poke 253,sc(x):sys 49152
  22. 210 print "[147]":next:poke 650,128
  23. 220 poke 251,b(0):poke 252,s(0):poke 253,sc(0):sys 49152
  24. 500 rem ---===*** title screen ***===---
  25. 510 print "[147]";tab(15);"animator 64"
  26. 520 print " this program allows you to create       moving graphics by";
  27. 530 print " making up to 24 lo-  res screens and flipping through them,  much";
  28. 540 print " like a flipbook."
  29. 550 print " the computer will ask you for the       screen you wish to edit."
  30. 560 print " while editing you may use almost all    keys as if you were in ";
  31. 570 print "direct mode."
  32. 580 print " one exception is that the colors will   be common to all screens."
  33. 590 print" 'f1' - returns to main screen"
  34. 600 print" 'f3' - increments border color"
  35. 610 print" 'f5' - increments background color"
  36. 620 print" 'f7' - changes foreground color to             current cursor color"
  37. 630 print "   press any key to begin."
  38. 640 poke 198,0
  39. 650 get a$:if a$="" then 650
  40. 1000 rem ---===*** main screen ***===---
  41. 1010 print "[147] which screen would you like to edit"
  42. 1020 print " (entering a number greater than 24      will display the ";
  43. 1030 print "options screen)":input" ";s:if s<1 or s<>int(s) then 1000
  44. 1040 if s>24 then goto 2000
  45. 1500 rem ---===*** edit ***===---
  46. 1510 poke 251,b(s):poke 252,s(s):poke 253,sc(s):sys 49152:poke 204,0
  47. 1520 get a$:if a$="" then 1520
  48. 1530 poke 204,1:poke peek(209)+peek(210)*256+peek(211),peek(206):print a$;
  49. 1540 if a$="[134]" then poke 53280,(peek(53280)+1) and 255
  50. 1550 if a$="[135]" then poke 53281,(peek(53281)+1) and 255
  51. 1560 if a$<>"[136]" then 1600
  52. 1570 poke 251,peek(211):poke 252,(peek(209)+256*peek(210)-256*sc(s))/40
  53. 1580 poke 648,4:print "[147]":poke 648,sc(s):poke 781,peek(252):poke 782,peek(251)
  54. 1590 poke 783,0:sys 65520
  55. 1600 poke 207,0:poke 205,1:poke 204,0
  56. 1610 if a$<>"[133]" then 1520
  57. 1620 poke 204,1:poke peek(209)+peek(210)*256+peek(211),peek(206)
  58. 1630 poke 251,b(0):poke 252,s(0):poke 253,sc(0):sys 49152:goto 1000
  59. 2000 rem ---===*** options ***===---
  60. 2010 print "[147] c[146]opy screen(s)
  61. 2020 [153] " awaitnimate"
  62. 2030 [153] " lwaitoad screens"
  63. 2040 [153]" mwaitain screen"
  64. 2050 [153] " swaitave screens"
  65. 2060 [153] " qwaituit"
  66. 2070 [153] " press a key."
  67. 2080 [161] a$:[139] a$[178]"c" [167] 2500
  68. 2090 [139] a$[178]"a"[167] 3000
  69. 2100 [139] a$[178]"l"[167] 3500
  70. 2110 [139] a$[178]"s"[167] 4000
  71. 2120 [139] a$[178]"m" [167] 1000
  72. 2130 [139] a$[178]"q" [167] [151] 53280,14:[151] 53281,6:[153] "loadcont";:[128]
  73. 2140 [137] 2080
  74. 2500 [143] ---===*** copy ***===---
  75. 2510 [133]" screen to copy";s:[139] s[179]1 [176] s[177]24 [167] 1000
  76. 2520 [133]" copy to screen";cs:[139] cs[179]1 [176] cs[177]24 [167] 1000
  77. 2530 [151] 251,0:[151] 253,0:[151] 252,sc(s):[151] 254,sc(cs):[158] 50000
  78. 2540 [133]" copy another [y/n]";a$
  79. 2550 [139] a$[178]"y" [167] 2500
  80. 2560 [137] 1000
  81. 3000 [143] ---===*** animate ***===---
  82. 3010 z[178]0:[133] "load animate screen 1 to screen ";s:[139] s[179]1 [176] s[177]24 [167] 1000
  83. 3020 [153] " animate 1 -"s"and back to 1 [y/n]";:[133] a$:[139] a$[178]"y" [167] z[178]99
  84. 3030 [133] " speed 1-16";sp:sp[178]16[171]sp
  85. 3040 [151] 198,0
  86. 3050 [129] x[178]1 [164] s:[151] 251,b(x):[151] 252,s(x):[151] 253,sc(x):[158] 49152
  87. 3060 [129] y[178]1 [164] sp[172]16:[139] [194](198) [167] 3110
  88. 3070 [130]:[130]:[139] z [179][177] 99 [167] 3050
  89. 3080 [129] x[178]s[171]1 [164] 2 [169] [171]1:[151] 251,b(x):[151] 252,s(x):[151] 253,sc(x):[158] 49152
  90. 3090 [129] y[178]1 [164] sp[172]16:[139] [194](198) [167] 3110
  91. 3100 [130]:[130]:[137] 3050
  92. 3110 [151] 198,0:[151] 251,b(0):[151] 252,s(0):[151] 253,sc(0):[158] 49152:[137] 1000
  93. 3500 [143] ---===*** load ***===---
  94. 3510 [133]"load filename";f$:f$[178][200](f$,12)[170]",s,r"
  95. 3520 [159] 15,8,15:[159] 2,8,8,f$
  96. 3530 [132]15,a,b$,c,d:[139] a[178]0 [167] 3570
  97. 3540 [139] a[178]62 [167] [153] "can't find "[200](f$,[195](f$)[171]4):[137] 3560
  98. 3550 [153] ""a","b$","c","d
  99. 3560 [153] " press any key.":[151] 198,0:[146] 198,1:[160] 2:[160] 15:[137] 1000
  100. 3570 [132]2,a$:[139] a$[179][177]"anm64" [167] [153] " not an animator file.":[137] 3560
  101. 3580 [161]#2,a$:n[178][198](a$):[129] x[178]1 [164] n:b[178]256[172]sc(x):[129] y[178]0 [164] 999
  102. 3590 [161]#2,a$:[151] b[170]y,[198](a$[170][199](0)):[130]:[130]:[160] 2:[160] 15:[137] 1000
  103. 4000 [143] ---===*** save ***===---
  104. 4010 [133]"load filename";f$:f$[178][200](f$,12)[170]",s,w"
  105. 4020 [159] 15,8,15:[159] 2,8,8,f$
  106. 4030 [132]15,a,b$,c,d:[139] a[178]0 [167] 4140
  107. 4040 [139] a[179][177]63 [167] 4120
  108. 4050 [153]""[200](f$,[195](f$)[171]4)" is already on the disk."
  109. 4060 [153]" nwaitew filename"
  110. 4070 [153]" rwaiteplace file"
  111. 4080 [153]" press a key."
  112. 4090 [161] a$:[139] a$[179][177]"n" [175] a$[179][177]"r" [167] 4090
  113. 4100 [139] a$[178]"n" [167] [160] 2:[160] 15:[137] 4010
  114. 4110 [160] 2:[152]15,"s 0:"[200](f$,[195](f$)[171]4):[160] 15:[137] 4020
  115. 4120 [153] "a","b$","c","d:print"qq press any key"
  116. 4130 poke 198,0:wait 198,1:poke 198,0:close 2:close 15:goto 1000
  117. 4140 print#2,"anm64"
  118. 4150 input" save screens 1 -";n
  119. 4160 print#2,chr$(n);:for x=1 to n:b=256*sc(x):for y=0 to 999
  120. 4170 print#2,chr$(peek(b+y));:next:next:close 2:close 15:goto 1000
  121.