home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 68 / 068.d81 / dinographics (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  6KB  |  197 lines

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