home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 55 / 055.d81 / ps.image.viewer (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  5KB  |  160 lines

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