home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 68
/
068.d81
/
dinographics
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
6KB
|
197 lines
10 :
20 rem --- setup ---
30 :
40 poke53280,2:poke53281,.:poke650,128
50 print"[147][153] [215]elcome to the [208]rint [211]hop [214]iewer":gosub60000
60 poke56,120:clr:a$="":poke2,1
70 :
80 rem change nb and nb$ in line 100 to 2 for two-block images
90 :
100 nb=3:nb$="3"
110 sys57812"dirtovar.o",8,0:poke780,0:poke781,0:poke782,141:sys65493
120 dimty$(144),na$(144),le$(144),im$(140),d$(8,29),e%(29)
130 sys36096
140 ni=0:fori=1to144:ifright$(na$(i),2)="-"+nb$thenni=ni+1:im$(ni)=na$(i)
150 ifna$(i)=""theni=144
160 next:dimme$(ni+2)
170 sys57812"text.o",8,0:poke780,0:poke781,71:poke782,198:sys65493
180 sys57812"unpacker",8,0:poke780,0:poke781,0:poke782,201:sys65493
190 sys57812"imloadsc6.o",8,0:poke780,0:poke781,0:poke782,128:sys65493
200 :
210 rem take out the rem in line 230 to skip dinographics info
220 :
230 rem goto310
240 sys57812"input any.o",8,0:poke780,0:poke781,60:poke782,3:sys65493
250 i=1:j=1:open3,8,3,"dino data"
260 get#3,a$,a$
270 sys828,3,40:ifa$="*"thene%(j)=i-1:j=j+1:i=1:goto290
280 d$(i,j)=a$:i=i+1
290 ifst=0then270
300 close3
310 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]"
320 si$="[221] [221]"
330 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]"
340 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]"
350 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]"
360 sp$=" "
370 sb$=" "
380 cs=1:jo=56320:cp=1:te=50759:zz=52637:zy=53078:zx=52224:zw=53198
390 poke51374,48:rem hi-res color
400 co=0:np=1
410 ex=.:ifni/2<>int(ni/2)thenex=1:ni=ni+1
415 if(ex)thenme$(ni)="-not selectable-":im$(ni)=me$(ni)
420 fori=1toni
430 me$(i)=im$(i):ni(np)=ni(np)+1:if(i/28)=int(i/28)and(i<>ni)thennp=np+1
435 ifexandi=nithen450
440 b=len(im$(i))-2:ifb<>16thenme$(i)=left$(im$(i),b)+left$(sp$,16-b)
450 next
470 gosub620:rem main screen
480 gosub850:rem move highlight and select images
490 ri=cs+(cp-1)*28:tf=0:fl=0
500 ix=13:iy=8:nl=20
510 ifa$="[133]"thengosub1100:sys51459:goto480
520 ifa$="[134]"thengosub1440:sys51459:goto480
530 ifa$<>"[135]"then570
540 cp=cp+1:ifcp>npthencp=1
550 gosub650:ifnp>1thencs=1
560 goto480
570 ifa$="[136]"thengosub1690:gosub750:goto480
580 di=ri:gosub1250:goto480
590 :
600 rem --- main screen ---
610 :
620 print"[147][153][146]"chr$(142)tp$si$si$di$;
630 fora=1to14:printsi$;:next
640 printdi$si$si$si$si$si$bt$;
650 fora=217to242:pokea,peek(a)or128:next
660 print"[146] loadstar's print shop viewer"
670 print"[150] by the friendly loadstar dudes "
680 print"";
690 mi=int(ni(cp)/2):rem middle image
700 if(np>1)and(cp<>np)thenmi=14
710 si=(cp-1)*28:rem starting image for current page
720 fora=si+1tosi+mi:printtab(1)"][154]"me$(a)"[ ][154]"me$(a+mi)"[":next
730 ifsi+14=si+mithen750
740 fora=si+13tosi+mistep-1:printsb$:next
750 poke214,18:print:print"[154]number of pages:"np;
760 printtab(23)"[154]current page:"cp
770 print"f1 [154]- auto mode"
780 print"f3 [154]- quick look crsr [159]keys move "
790 ifnp>1thenprint"f5 [154]- next page [158]highlight"
800 print"f7 [154]- quit return [159]selects"
810 return
820 :
830 rem --- select image ---
840 :
850 b=cs:ifb>mithenb=b-mi
860 print"";:fora=1tob:print:next
870 printtab(2);:ifcs>mithenprinttab(19)"->";
880 print""me$(si+cs);:poke198,.
890 ifcs<mi+1thenprint"[146]<-";
900 geta$:gosub1030:ifa$=""then900
910 if(a$=chr$(13))and(im$(si+cs)="-not selectable-")then900
920 if(a$=chr$(13))or(a$="[133]")or(a$="[134]")or(a$="[135]")or(a$="[136]")thenreturn
930 b=cs:ifb>mithenb=b-mi
940 print"";:fora=1tob:print:next
950 printtab(2);:ifcs>mithenprinttab(19)" ";
960 print"[154]"me$(si+cs);
970 ifcs<mi+1thenprint" ";
980 ifa$=""thencs=cs+1:ifcs>ni(cp)thencs=ni(cp)
990 ifa$="[145]"thencs=cs-1:ifcs<1thencs=1
1000 ifa$=""thencs=cs+mi:ifcs>ni(cp)thencs=cs-mi*2
1010 ifa$="[157]"thencs=cs-mi:ifcs<1thencs=cs+mi*2
1020 goto850
1030 if(peek(jo)and16)=.thena$=chr$(13):return
1040 a=(peek(jo)and15):ifa=15thenreturn
1050 ifa=14thena$="[145]"
1060 ifa=07thena$=""
1070 ifa=13thena$=""
1080 ifa=11thena$="[157]"
1090 return
1100 fordi=ritoni:tf=1
1110 ifim$(di)="-not selectable-"then1150
1120 gosub1250:rem plot ps image
1130 poke249,224:poke250,204:sys50765:ifa$="q"ora$="[209]"thenreturn
1140 fl=1
1150 next:ifri=1thenreturn
1160 fordi=1tori-1:tf=1
1170 ifim$(di)="-not selectable-"then1210
1180 gosub1250:rem plot ps image
1190 poke249,224:poke250,204:sys50765:ifa$="q"ora$="[209]"thenreturn
1200 fl=1
1210 next:return
1220 :
1230 rem --- plot ps image ---
1240 :
1250 iffl=.thenpoke249,224:poke250,204:sys51459:sys50765
1255 poke53270,peek(53270)and239
1260 :
1270 rem take out the rem in line 1290 to skip dinographics info
1280 :
1290 rem goto1340
1300 fori=0to39:pokezx+40+i,16:next
1305 fori=0to10:forj=0to5:pokezz+i+j*40,240:next:next
1310 fori=0to10:forj=0to1:pokezy+i+j*40,64:next:next
1320 w=di
1330 fori=1toe%(w):syste,d$(i,w),(160-len(d$(i,w))*8/2),8*i:next
1340 poke53270,200
1350 sys32768,im$(di),nb,57344,60648
1360 syste,"press a key",112,168:iftf=1thensyste,"q to quit",120,176
1370 poke198,.
1380 geta$:gosub1030:ifa$=""then1380
1390 iftf=.thensys51459
1400 return
1410 :
1420 rem --- auto mode ---
1430 :
1440 px=0:py=2:tf=1:poke249,224:poke250,204:sys51459:sys50765:poke53270,200
1450 gosub1620:iy=iy-1
1460 forx=1toni-ex
1470 poke53270,200:sys32768,im$(x),nb,57344,57344+px*8+py*320
1475 ifnb=3thenfori=0to88step8:poke57344+px*8+py*320+1916+i,0:next
1480 px=px+ix:ifpx>33thenpx=.:py=py+iy
1490 geta$:ifa$="q"ora$="[209]"thenreturn
1500 fl=.:ifpx=.andpy=23thengosub1540:iffl=1thenreturn
1510 next:fl=1:syste,"press any key",118,188
1520 poke198,.:wait198,1:return
1530 :
1540 fori=0to13:pokezw+i,64:next
1550 syste,"press any key",118,192
1560 poke198,.:wait198,1:geta$:poke198,.:ifa$="q"ora$="[209]"thenfl=1:return
1570 poke249,224:poke250,204:sys50765
1580 gosub1620:px=.:py=2:return
1590 :
1600 rem --- quick look ---
1610 :
1620 fori=0to79:pokezx+i,240:next
1630 syste,"print shop is a trademark of broderbund",0,0
1640 syste,"software ----------- press q to quit.",0,8
1650 return
1660 :
1670 rem --- return to loadstar ---
1680 :
1690 poke214,18:print:print"[146]";
1700 fora=1to2:printsb$:next
1710 print"[154] are you sure you want to quit? (y[154]/n[154])":poke198,.
1720 fora=1to2:printsb$:next
1730 a=peek(203):ifa<>25anda<>39then1730
1740 ifa=39thenreturn
1750 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
1760 ifer<>63thenprint"";:poke198,.:end
1770 poke646,peek(53281)
1780 print"[147]load"chr$(34)"hello connect"chr$(34)",8"
1790 print"run"
1800 poke631,13:poke632,13:poke198,2:end
10000 open15,8,15,"s0:dinographics":close15:save"0:dinographics",8:end
60000 b9$=" "
60010 poke214,14:print:print" [155][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][152]"
60020 fori=0to7:printb9$:next:print" [151][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][152]"
60030 b9$(0)="[196]inographics"
60040 b9$(1)="by [202]ack [208]enn"
60050 b9$(2)="([195]) 1990 by [211]oftdisk, [201]nc."
60060 b9$(3)="[208]ublished on [204][207][193][196][211][212][193][210] #68"
60070 b9$(4)="[211]ubscriptions 1-800-831-2694"
60080 b9$(5)="[193]ll