home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 40 / 040.d81 / ps.image.viewer (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1987-01-01  |  4.8 KB  |  157 lines

  1. 8 :
  2. 9 :
  3. 10 poke53280,2:poke53281,.:poke650,128
  4. 12 ifx=.thenprintchr$(142)"[147][153]    welcome to the print shop viewer"
  5. 15 ifx=.thenx=1:load"bload.o",8,1
  6. 20 poke56,120:clr:poke2,1
  7. 25 sys828,50759,"text/dot/wipe.o"
  8. 30 sys828,51456,"unpacker"
  9. 35 sys828,32768,"ps.combo2.o"
  10. 39 :
  11. 40 gosub1500:rem define strings & vars
  12. 50 gosub1000:rem read names of images
  13. 55 gosub2000:rem display names for view
  14. 60 gosub2500:rem move highlight and                      select images
  15. 65 ri=cs+(cp-1)*28:tf=.:fl=.
  16. 70 ifa$="[133]"thengosub3000:sys51459:goto60
  17. 75 ifa$="[134]"thengosub5000:sys51459:goto60
  18. 80 ifa$="[135]"thencp=cp+1:ifcp>npthencp=1
  19. 81 ifa$="[135]"thengosub2040:ifnp>1thencs=1
  20. 82 ifa$="[135]"then60
  21. 85 ifa$="[136]"thengosub60000:gosub2100:goto60
  22. 90 sys828,22528,im$(ri):di=ri:gosub4000:goto60
  23. 990 stop
  24. 999 :
  25. 1000 open3,8,3,"ps.image.names":co=.:np=1
  26. 1005 input#3,ni:rem   number of images
  27. 1006 ex=.:ifni/2<>int(ni/2)thenni=ni+1:ex=1
  28. 1010 dim im$(ni),by$(ni),me$(ni)
  29. 1020 fora=1toni
  30. 1025 ifby$(a)="*"thenby$(a)=by$(a-1)
  31. 1030 input#3,im$(a),by$(a):me$(a)=im$(a):co=co+1
  32. 1040 ifby$(a)="*"thenby$(a)=by$(a-1)
  33. 1050 ni(np)=ni(np)+1:ifco=28thenco=.:np=np+1
  34. 1060 b=len(me$(a)):ifb<>16thenme$(a)=me$(a)+left$(sp$,16-b)
  35. 1070 next:close3
  36. 1080 if(ex)thenim$(ni)="-not selectable-":me$(ni)="[150]"+im$(ni)
  37. 1090 return
  38. 1100 :
  39. 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]"
  40. 1510 si$="[221]                                      [221]"
  41. 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]"
  42. 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]"
  43. 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]"
  44. 1550 sp$="                "
  45. 1560 cs=1    :rem current selection
  46. 1570 jo=56320:rem joystick port 2
  47. 1580 cp=1    :rem current page
  48. 1990 return
  49. 1999 :
  50. 2000 print"[147][153][146]"tp$si$si$di$;
  51. 2010 fora=1to14:printsi$;:next
  52. 2020 printdi$si$si$si$si$si$bt$;
  53. 2030 fora=217to242:pokea,peek(a)or128:next
  54. 2040 print"[146]        [158]print shop viewer v2"
  55. 2050 print"[150]by a. gardner, j. weiler, & m. maynard"
  56. 2060 print"";
  57. 2070 mi=int(ni(cp)/2):rem middle image
  58. 2080 if(np>1)and(cp<>np)thenmi=14
  59. 2085 si=(cp-1)*28:rem starting image                          for current page
  60. 2090 fora=si+1tosi+mi:printtab(1)"][154]"me$(a)"[  ][154]"me$(a+mi)"[":next
  61. 2093 ifsi+14=si+mithen2100
  62. 2096 fora=si+13tosi+mistep-1:print"                                      ":next
  63. 2100 print"[154]number of pages:"np;
  64. 2110 printtab(23)"[154]current page:"cp
  65. 2120 print"f1 [154]- auto mode"
  66. 2130 print"f3 [154]- quick look       [158]crsr keys move "
  67. 2140 print"f5 [154]- next page          [158]highlight"
  68. 2150 print"f7 [154]- quit           [158]return selects it."
  69. 2160 return
  70. 2500 b=cs:ifb>mithenb=b-mi
  71. 2510 print"";:fora=1tob:print:next
  72. 2520 printtab(2);:ifcs>mithenprinttab(19)"->";
  73. 2530 print""me$(si+cs);:poke198,.
  74. 2535 ifcs<mi+1thenprint"[146]<-";
  75. 2540 geta$:gosub2700:ifa$=""then2540
  76. 2543 ifa$=chr$(13)andim$(cs)="-not selectable-"then2540
  77. 2545 if(a$=chr$(13))or(a$="[133]")or(a$="[134]")or(a$="[135]")or(a$="[136]")thenreturn
  78. 2550 b=cs:ifb>mithenb=b-mi
  79. 2560 print"";:fora=1tob:print:next
  80. 2570 printtab(2);:ifcs>mithenprinttab(19)"  ";
  81. 2580 print"[154]"me$(si+cs);
  82. 2585 ifcs<mi+1thenprint"  ";
  83. 2590 ifa$=""thencs=cs+1:ifcs>ni(cp)thencs=ni(cp)
  84. 2600 ifa$="[145]"thencs=cs-1:ifcs<1thencs=1
  85. 2610 ifa$=""thencs=cs+mi:ifcs>ni(cp)thencs=cs-mi*2
  86. 2620 ifa$="[157]"thencs=cs-mi:ifcs<1thencs=cs+mi*2
  87. 2640 goto2500
  88. 2700 if(peek(jo)and16)=.thena$=chr$(13):return
  89. 2710 a=(peek(jo)and15):ifa=15thenreturn
  90. 2720 ifa=14thena$="[145]"
  91. 2730 ifa=07thena$=""
  92. 2740 ifa=13thena$=""
  93. 2750 ifa=11thena$="[157]"
  94. 2760 return
  95. 2990 rem display the images starting at          ri (which is where the high-
  96. 2991 rem light is currently at) and              ending with the last image
  97. 3000 fordi=ritoni:tf=1
  98. 3005 if(di=ni)and(ex)then3030
  99. 3010 sys828,22528,im$(di)
  100. 3012 gosub4000:rem plot ps image
  101. 3020 poke249,224:poke250,204:sys50765:ifa$="q"ora$="[209]"thenreturn
  102. 3025 fl=1
  103. 3030 next:ifri=1thenreturn:rem if            ri=1 we started at the beginning
  104. 3035 rem display the images starting             at 1 and ending at ri - 1
  105. 3040 fordi=1tori-1:tf=1
  106. 3045 if(di=ni)and(ex)then3080
  107. 3050 sys828,22528,im$(di)
  108. 3060 gosub4000:rem plot ps image
  109. 3070 poke249,224:poke250,204:sys50765:ifa$="q"ora$="[209]"thenreturn
  110. 3075 fl=1
  111. 3080 next:return
  112. 4000 iffl=.thenpoke249,224:poke250,204:sys51459:sys50765
  113. 4007 n$=im$(di):poke53270,200:sys50759,n$,(240-len(n$)*8/2),72
  114. 4008 n$="created by":sys50759,n$,200,88
  115. 4009 n$=by$(di):sys50759,n$,(250-len(n$)*8/2),104
  116. 4010 :
  117. 4015 poke53270,200
  118. 4020 poke33057,8:poke33058,212:sys32776
  119. 4025 poke33057,8:poke33058,1:sys32768
  120. 4030 :
  121. 4060 sys50759,"press a key",112,172:iftf=1thensys50759,"[q to quit]",112,180
  122. 4062 poke198,.
  123. 4065 geta$:gosub2700:ifa$=""then4065
  124. 4070 iftf=.thensys51459
  125. 4080 return
  126. 5000 px=.:py=.:tf=1:poke249,224:poke250,204:sys51459:sys50765:poke53270,200
  127. 5005 mm=1
  128. 5010 gosub7000
  129. 5050 forx=1toni-ex:sys828,22528,im$(x)
  130. 5060 poke53270,200:poke33057,py:poke33058,px:sys32776
  131. 5070 px=px+45:if(px>224)or((mm=2)and(px>201))thenpx=.:py=py+46:mm=mm+1
  132. 5075 ifpx=45andmm=2thenpx=67
  133. 5080 geta$:ifa$="q"ora$="[209]"thenreturn
  134. 5090 fl=.:ifx/20=int(x/20)thengosub6000:iffl=1thenreturn
  135. 5100 next:fl=1:syste,"[press a key]",118,188
  136. 5110 poke198,.:wait198,1:return
  137. 5120 :
  138. 6000 syste,"[press a key]",118,188:mm=mm+1
  139. 6010 poke198,.:wait198,1:geta$:poke198,.:ifa$="q"ora$="[209]"thenfl=1:return
  140. 6020 poke249,224:poke250,204:sys50765
  141. 6030 gosub7000:px=.:py=.
  142. 6040 return
  143. 7000 te=50759:syste,"print shop",244,40:syste,"is a",268,48
  144. 7010 syste,"trademark",244,56
  145. 7020 syste,"of",276,64:syste,"broderbund",244,72
  146. 7030 syste,"software",252,80:syste,"q to quit",244,110
  147. 7040 return
  148. 60000 print"[146]";
  149. 60010 fora=1to2:print"                                      ":next
  150. 60020 print"[154] are you sure you want to quit? (y[154]/n[154])":poke198,.
  151. 60030 fora=1to2:print"                                      ":next
  152. 60040 a=peek(203):ifa<>25anda<>39then60040
  153. 60050 ifa=39thenreturn
  154. 60060 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
  155. 60070 ifer<>63thenprint"";:poke198,.:end
  156. 60080 load"hello connect",8
  157.