home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1994 August
/
1994-08b.d64
/
animator
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
5KB
|
121 lines
5 rem copyright 1994 - compute publications intl ltd - all rights reserved
10 rem ---===*** setup ***===---
20 data 9,1,8,9,10,11,12,13,14,15
30 data 12,0,1,2,3,8,9,10,11,12,13,14,15
40 data 4,0,1,2,3
50 poke 56,32:poke 52,32:clr:poke 53280,6:poke 53281,0:print"[159]":
60 dim b(25),s(25),sc(25):c=0
70 for b=1 to 3:read n:for x=1 to n
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
90 data 169,0,133,251,133,253,169,208,133,252,169,80,133,254,160,0,177,251
100 data 145,253,200,208,249,230,252,230,254,169,96,197,254,208,239,96
110 for x=0 to 33:read y:poke 49152+x,y:next
120 poke 56334,peek(56334) and 254:poke 1,peek(1) and 251:sys49152
130 poke 1,peek(1) or 4:poke 56334,peek(56334) or 1
140 data 169,3,13,2,221,141,2,221,169,252,45,0,221,5,251,168,169,15,45,24,208
150 data 5,252,170,165,253,140,0,221,142,24,208,141,136,2,169,19,32,210,255,96
160 for x=0 to 40:read y:poke 49152+x,y:next
170 data 165,252,170,232,232,232,232,134,2,160,0,177,251,145,253,200,208,249
180 data 230,252,230,254,165,2,197,252,208,239,96
190 for x=0 to 28:read y:poke 50000+x,y:next
200 for x=1 to 24:poke 251,b(x):poke 252,s(x):poke 253,sc(x):sys 49152
210 print "[147]":next:poke 650,128
220 poke 251,b(0):poke 252,s(0):poke 253,sc(0):sys 49152
500 rem ---===*** title screen ***===---
510 print "[147]";tab(15);"animator 64"
520 print " this program allows you to create moving graphics by";
530 print " making up to 24 lo- res screens and flipping through them, much";
540 print " like a flipbook."
550 print " the computer will ask you for the screen you wish to edit."
560 print " while editing you may use almost all keys as if you were in ";
570 print "direct mode."
580 print " one exception is that the colors will be common to all screens."
590 print" 'f1' - returns to main screen"
600 print" 'f3' - increments border color"
610 print" 'f5' - increments background color"
620 print" 'f7' - changes foreground color to current cursor color"
630 print " press any key to begin."
640 poke 198,0
650 get a$:if a$="" then 650
1000 rem ---===*** main screen ***===---
1010 print "[147] which screen would you like to edit"
1020 print " (entering a number greater than 24 will display the ";
1030 print "options screen)":input" ";s:if s<1 or s<>int(s) then 1000
1040 if s>24 then goto 2000
1500 rem ---===*** edit ***===---
1510 poke 251,b(s):poke 252,s(s):poke 253,sc(s):sys 49152:poke 204,0
1520 get a$:if a$="" then 1520
1530 poke 204,1:poke peek(209)+peek(210)*256+peek(211),peek(206):print a$;
1540 if a$="[134]" then poke 53280,(peek(53280)+1) and 255
1550 if a$="[135]" then poke 53281,(peek(53281)+1) and 255
1560 if a$<>"[136]" then 1600
1570 poke 251,peek(211):poke 252,(peek(209)+256*peek(210)-256*sc(s))/40
1580 poke 648,4:print "[147]":poke 648,sc(s):poke 781,peek(252):poke 782,peek(251)
1590 poke 783,0:sys 65520
1600 poke 207,0:poke 205,1:poke 204,0
1610 if a$<>"[133]" then 1520
1620 poke 204,1:poke peek(209)+peek(210)*256+peek(211),peek(206)
1630 poke 251,b(0):poke 252,s(0):poke 253,sc(0):sys 49152:goto 1000
2000 rem ---===*** options ***===---
2010 print "[147] c[146]opy screen(s)
2020 [153] " awaitnimate"
2030 [153] " lwaitoad screens"
2040 [153]" mwaitain screen"
2050 [153] " swaitave screens"
2060 [153] " qwaituit"
2070 [153] " press a key."
2080 [161] a$:[139] a$[178]"c" [167] 2500
2090 [139] a$[178]"a"[167] 3000
2100 [139] a$[178]"l"[167] 3500
2110 [139] a$[178]"s"[167] 4000
2120 [139] a$[178]"m" [167] 1000
2130 [139] a$[178]"q" [167] [151] 53280,14:[151] 53281,6:[153] "loadcont";:[128]
2140 [137] 2080
2500 [143] ---===*** copy ***===---
2510 [133]" screen to copy";s:[139] s[179]1 [176] s[177]24 [167] 1000
2520 [133]" copy to screen";cs:[139] cs[179]1 [176] cs[177]24 [167] 1000
2530 [151] 251,0:[151] 253,0:[151] 252,sc(s):[151] 254,sc(cs):[158] 50000
2540 [133]" copy another [y/n]";a$
2550 [139] a$[178]"y" [167] 2500
2560 [137] 1000
3000 [143] ---===*** animate ***===---
3010 z[178]0:[133] "load animate screen 1 to screen ";s:[139] s[179]1 [176] s[177]24 [167] 1000
3020 [153] " animate 1 -"s"and back to 1 [y/n]";:[133] a$:[139] a$[178]"y" [167] z[178]99
3030 [133] " speed 1-16";sp:sp[178]16[171]sp
3040 [151] 198,0
3050 [129] x[178]1 [164] s:[151] 251,b(x):[151] 252,s(x):[151] 253,sc(x):[158] 49152
3060 [129] y[178]1 [164] sp[172]16:[139] [194](198) [167] 3110
3070 [130]:[130]:[139] z [179][177] 99 [167] 3050
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
3090 [129] y[178]1 [164] sp[172]16:[139] [194](198) [167] 3110
3100 [130]:[130]:[137] 3050
3110 [151] 198,0:[151] 251,b(0):[151] 252,s(0):[151] 253,sc(0):[158] 49152:[137] 1000
3500 [143] ---===*** load ***===---
3510 [133]"load filename";f$:f$[178][200](f$,12)[170]",s,r"
3520 [159] 15,8,15:[159] 2,8,8,f$
3530 [132]15,a,b$,c,d:[139] a[178]0 [167] 3570
3540 [139] a[178]62 [167] [153] "can't find "[200](f$,[195](f$)[171]4):[137] 3560
3550 [153] ""a","b$","c","d
3560 [153] " press any key.":[151] 198,0:[146] 198,1:[160] 2:[160] 15:[137] 1000
3570 [132]2,a$:[139] a$[179][177]"anm64" [167] [153] " not an animator file.":[137] 3560
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
3590 [161]#2,a$:[151] b[170]y,[198](a$[170][199](0)):[130]:[130]:[160] 2:[160] 15:[137] 1000
4000 [143] ---===*** save ***===---
4010 [133]"load filename";f$:f$[178][200](f$,12)[170]",s,w"
4020 [159] 15,8,15:[159] 2,8,8,f$
4030 [132]15,a,b$,c,d:[139] a[178]0 [167] 4140
4040 [139] a[179][177]63 [167] 4120
4050 [153]""[200](f$,[195](f$)[171]4)" is already on the disk."
4060 [153]" nwaitew filename"
4070 [153]" rwaiteplace file"
4080 [153]" press a key."
4090 [161] a$:[139] a$[179][177]"n" [175] a$[179][177]"r" [167] 4090
4100 [139] a$[178]"n" [167] [160] 2:[160] 15:[137] 4010
4110 [160] 2:[152]15,"s 0:"[200](f$,[195](f$)[171]4):[160] 15:[137] 4020
4120 [153] "a","b$","c","d:print"qq press any key"
4130 poke 198,0:wait 198,1:poke 198,0:close 2:close 15:goto 1000
4140 print#2,"anm64"
4150 input" save screens 1 -";n
4160 print#2,chr$(n);:for x=1 to n:b=256*sc(x):for y=0 to 999
4170 print#2,chr$(peek(b+y));:next:next:close 2:close 15:goto 1000