home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 39
/
039.d81
/
ps.image.viewer
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
5KB
|
153 lines
1 rem to put your own images in this viewer:
2 rem 1) create a seq file with the number of images, followed by
3 rem "image name,aurthur" <cr>.
4 rem seq file should be named "ps.image.names"
5 rem 2) if the same person created the previous image, put an (*).
6 rem 3) if your using edstar, leave one blank line at the begin-
7 rem ning of the file.
8 :
9 :
10 poke53280,2:poke53281,.:poke650,128
12 ifx=.thenprintchr$(142)"[147][153] welcome to the print shop viewer"
15 ifx=.thenx=1:load"bload.o",8,1
20 poke56,120:clr:poke2,1
25 sys828,50759,"text/dot/wipe.o"
30 sys828,51456,"unpacker"
35 sys828,32768,"ps.combo2.o"
39 :
40 gosub1500:rem define strings & vars
50 gosub1000:rem read names of images
55 gosub2000:rem display names for view
60 gosub2500:rem move highlight and select images
65 ri=cs+(cp-1)*28:tf=.:fl=.
70 ifa$="[133]"thengosub3000:sys51459:goto60
75 ifa$="[134]"thengosub5000:sys51459:goto60
80 ifa$="[135]"thencp=cp+1:ifcp>npthencp=1
81 ifa$="[135]"thengosub2040:ifnp>1thencs=1
82 ifa$="[135]"then60
85 ifa$="[136]"thengosub60000:gosub2100:goto60
90 sys828,22528,im$(ri):di=ri:gosub4000:goto60
990 stop
999 :
1000 open3,8,3,"ps.image.names":co=.:np=1
1005 input#3,ni:rem number of images
1010 dim im$(ni),by$(ni),me$(ni)
1020 fora=1toni
1025 ifby$(a)="*"thenby$(a)=by$(a-1)
1030 input#3,im$(a),by$(a):me$(a)=im$(a):co=co+1
1040 ifby$(a)="*"thenby$(a)=by$(a-1)
1050 ni(np)=ni(np)+1:ifco=28thenco=.:np=np+1
1060 b=len(me$(a)):ifb<>16thenme$(a)=me$(a)+left$(sp$,16-b)
1070 next:close3:return
1080 :
1500 tp$="[213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]"
1510 si$="[221] [221]"
1520 di$="[171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]"
1530 bo$="[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]"
1540 bt$="[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203][157][148][192]"
1550 sp$=" "
1560 cs=1 :rem current selection
1570 jo=56320:rem joystick port 2
1580 cp=1 :rem current page
1990 return
1999 :
2000 print"[147][153][146]"tp$si$si$di$;
2010 fora=1to14:printsi$;:next
2020 printdi$si$si$si$si$si$bt$;
2030 fora=217to242:pokea,peek(a)or128:next
2040 print"[146] [158]print shop viewer v2"
2050 print"[150]by a. gardner, j. weiler, & m. maynard"
2060 print"";
2070 mi=int(ni(cp)/2):rem middle image
2080 if(np>1)and(cp<>np)thenmi=14
2085 si=(cp-1)*28:rem starting image for current page
2090 fora=si+1tosi+mi:printtab(1)"][154]"me$(a)"[ ][154]"me$(a+mi)"[":next
2093 ifsi+14=si+mithen2100
2096 fora=si+13tosi+mistep-1:print" ":next
2100 print"[154]number of pages:"np;
2110 printtab(23)"[154]current page:"cp
2120 print"f1 [154]- auto mode"
2130 print"f3 [154]- quick look [158]crsr keys move "
2140 print"f5 [154]- next page [158]highlight"
2150 print"f7 [154]- quit [158]return selects it."
2160 return
2500 b=cs:ifb>mithenb=b-mi
2510 print"";:fora=1tob:print:next
2520 printtab(2);:ifcs>mithenprinttab(19)"->";
2530 print""me$(si+cs);:poke198,.
2535 ifcs<mi+1thenprint"[146]<-";
2540 geta$:gosub2700:ifa$=""then2540
2545 if(a$=chr$(13))or(a$="[133]")or(a$="[134]")or(a$="[135]")or(a$="[136]")thenreturn
2550 b=cs:ifb>mithenb=b-mi
2560 print"";:fora=1tob:print:next
2570 printtab(2);:ifcs>mithenprinttab(19)" ";
2580 print"[154]"me$(si+cs);
2585 ifcs<mi+1thenprint" ";
2590 ifa$=""thencs=cs+1:ifcs>ni(cp)thencs=ni(cp)
2600 ifa$="[145]"thencs=cs-1:ifcs<1thencs=1
2610 ifa$=""thencs=cs+mi:ifcs>ni(cp)thencs=cs-mi*2
2620 ifa$="[157]"thencs=cs-mi:ifcs<1thencs=cs+mi*2
2640 goto2500
2700 if(peek(jo)and16)=.thena$=chr$(13):return
2710 a=(peek(jo)and15):ifa=15thenreturn
2720 ifa=14thena$="[145]"
2730 ifa=07thena$=""
2740 ifa=13thena$=""
2750 ifa=11thena$="[157]"
2760 return
2990 rem display the images starting at ri (which is where the high-
2991 rem light is currently at) and ending with the last image
3000 fordi=ritoni:tf=1
3010 sys828,22528,im$(di)
3012 gosub4000:rem plot ps image
3020 poke249,224:poke250,204:sys50765:ifa$="q"ora$="[209]"thenreturn
3030 fl=1:next:ifri=1thenreturn:rem if ri=1 we started at the beginning
3035 rem display the images starting at 1 and ending at ri - 1
3040 fordi=1tori-1:tf=1
3050 sys828,22528,im$(di)
3060 gosub4000:rem plot ps image
3070 poke249,224:poke250,204:sys50765:ifa$="q"ora$="[209]"thenreturn
3080 fl=1:next:return
4000 iffl=.thenpoke249,224:poke250,204:sys51459:sys50765
4007 n$=im$(di):poke53270,200:sys50759,n$,(240-len(n$)*8/2),72
4008 n$="created by":sys50759,n$,200,88
4009 n$=by$(di):sys50759,n$,(250-len(n$)*8/2),104
4010 :
4015 poke53270,200
4020 poke33057,8:poke33058,212:sys32776
4025 poke33057,8:poke33058,1:sys32768
4030 :
4060 sys50759,"press a key",112,172:iftf=1thensys50759,"[q to quit]",112,180
4062 poke198,.
4065 geta$:gosub2700:ifa$=""then4065
4070 iftf=.thensys51459
4080 return
5000 px=.:py=.:tf=1:poke249,224:poke250,204:sys51459:sys50765:poke53270,200
5010 gosub7000
5050 forx=1toni:sys828,22528,im$(x)
5060 poke53270,200:poke33057,py:poke33058,px:sys32776
5070 px=px+45:ifpx>224thenpx=.:py=py+46
5080 geta$:ifa$="q"ora$="[209]"thenreturn
5090 fl=.:ifx/20=int(x/20)thengosub6000:iffl=1thenreturn
5100 next:fl=1:syste,"[press a key]",118,188
5110 poke198,.:wait198,1:return
5120 :
6000 syste,"[press a key]",118,188
6010 poke198,.:wait198,1:geta$:poke198,.:ifa$="q"ora$="[209]"thenfl=1:return
6020 poke249,224:poke250,204:sys50765
6030 gosub7000:px=.:py=.:return
7000 te=50759:syste,"print shop",244,40:syste,"is a",268,48
7010 syste,"trademark",244,56
7020 syste,"of",276,64:syste,"broderbund",244,72
7030 syste,"software",252,80:syste,"q to quit",244,110
7040 return
60000 print"[146]";
60010 fora=1to2:print" ":next
60020 print"[154] are you sure you want to quit? (y[154]/n[154])":poke198,.
60030 fora=1to2:print" ":next
60040 a=peek(203):ifa<>25anda<>39then60040
60050 ifa=39thenreturn
60060 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
60070 ifer<>63thenprint"";:poke198,.:end
60080 load"hello connect",8