home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 102 / 102.d81 / slideshow (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  4KB  |  116 lines

  1. 100 rem view slideshow by steve emsley
  2. 110 ifdv=0thenpoke55,.:poke56,88:clr:dv=peek(186):ifdv<8thendv=8
  3. 120 ifa=0thena=1:load"es3.o",dv,1
  4. 130 ifa=1thena=2:load"toolkit cc00",dv,1
  5. 140 vi=53248:dn$="":mt=49152+12*256:cm=mt:box=mt+3
  6. 150 dimpn$(24),d1(24),d2(24),sp(24),pm$(24,11),tx(24),br(24),bk(24),ct(24)
  7. 160 sn$="slickshow dm.scr":rem name of slideshow
  8. 165 ifright$(sn$,4)=".scr"thensn$=left$(sn$,len(sn$)-4)
  9. 170 poke53280,00:poke53281,00:rem set background and border colors for start
  10. 180 d1$="000010":d2$="000020":rem set delays, 1 for text, 2 for pic
  11. 190 pm=49152:tm=pm+3:rem pm is pic mode & tm is text mode
  12. 200 sv(1)=49158:rem routine to save pic as koala
  13. 210 sv(2)=49161:rem routine to save pic as koala
  14. 220 ss=51029
  15. 230 ::
  16. 240 print"[147]":poke53272,23:gosub950
  17. 250 ms$="[210]eading [211]lideshow [196]ata...":gosub1060
  18. 260 open1,dv,15,"i0":open2,dv,2,"0:"+sn$+".scr,s,r":get#2,a$,a$
  19. 265 input#1,e:ifethen570
  20. 270 input#2,pn
  21. 280 forw=1topn:input#2,pn$(w),d1(w),d2(w),sp(w),tx(w),br(w),bk(w),ct(w)
  22. 290 ifct(w)thengosub320:gosub330:goto310
  23. 300 gosub330:gosub320
  24. 310 next:close2:close1:goto340
  25. 320 forj=1to11:input#2,x$:next:return
  26. 330 forj=1to11:input#2,pm$(w,j):next:return
  27. 340 forw=1topn:f$=pn$(w):ifright$(f$,2)<>".p"thenf$=f$+".p"
  28. 350 x1=9+(3*d1(w)):x2=36+(3*d2(w)):rem set up display type
  29. 360 gosub890:poke53280,br(w):poke53281,bk(w):poke646,tx(w)
  30. 370 sysbox,1,38,7,17,160,peek(646):poke199,1
  31. 380 forz=1to11:ifpm$(w,z)=""then400
  32. 390 sysmt+18,6+z,pm$(w,z)
  33. 395 rem sysmt+15,1,6+z,pm$(w,z)
  34. 400 nextz:poke49775,sp(w):poke49798,sp(w):poke198,.
  35. 410 gosub920:ti$="000000":sysmt+6,216:poke198,0
  36. 420 ifti$>d1$then450
  37. 430 geta$:ifa$<>" "anda$<>"q"then420
  38. 440 poke198,0:jq%=0:ifa$="q"thenjq%=1:gosub750:goto430
  39. 450 print"[147]":syspm:poke53280,peek(ss):poke53281,peek(ss+1):syspm+x1:ti$="000000"
  40. 460 ifti$>d2$then560
  41. 470 geta$:ifa$=""then460
  42. 480 ifa$=chr$(133)thensys50845:goto460
  43. 490 ifa$=chr$(137)thensys50857:goto460
  44. 500 ifa$=chr$(134)thensys50827:goto460
  45. 510 ifa$=chr$(138)thensys50839:goto460
  46. 520 ifa$=chr$(32)then560
  47. 530 ifa$="s"ora$="[211]"thengosub580:goto460:save pic
  48. 540 ifa$="q"ora$="[209]"thengosub750
  49. 550 goto460
  50. 560 syspm+x2:systm:next:goto340
  51. 570 ms$="[195]an't access slideshow data!":close2:close1:gosub1070:print"[147]":end
  52. 580 tt$=ti$:systm:sysmt+9,216:ms$="[211]ave this unpacked picture? ([217]/[206])":gosub1070
  53. 590 ifa$="y"ora$="[217]"then610
  54. 600 ms$="[208]ress a key to continue":goto740
  55. 610 ms$="[211]ave as [203]oala or [207][195][208]? ([203]/[207])":gosub1070:ifa$<>"k"anda$<>"o"then610
  56. 620 in$=left$(f$,len(f$)-2):ifa$="o"then660
  57. 630 sf$=chr$(129)+"pic a "+in$+"         "
  58. 640 iflen(sf$)>15thensf$=left$(sf$,15)
  59. 650 goto690
  60. 660 sf$=in$+"             "
  61. 670 iflen(sf$)>12thensf$=left$(sf$,12)
  62. 680 sf$=sf$+"mpic"
  63. 690 gosub1080:open1,jj,15:open8,jj,2,sf$:input#1,er,er$:close8:close1
  64. 700 ifer=.then730
  65. 710 ms$="[211]aving...":gosub1060:open9,jj,1,sf$:iflen(sf$)=15thensyssv(1):goto730
  66. 720 syssv(2)
  67. 730 close1:open1,jj,15:input#1,aa$,bb$,cc$,dd$:ms$=aa$+","+bb$+","+cc$+","+dd$
  68. 740 close1:gosub1070:syspm:ti$=tt$:return
  69. 750 tt$=ti$:systm
  70. 760 sysmt+9,216:ms$="[209]uit? [193]re you sure? ([217]/[206])":gosub1070:ifa$<>"y"then800
  71. 770 poke55,.:poke56,160:
  72. 780 ms$="[201]nsert [204][207][193][196][211][212][193][210] disk and press a key":gosub1070
  73. 790 goto1160
  74. 800 ifjq%thensysmt+9,216:return
  75. 810 print"[147]":syspm:ti$=tt$:return
  76. 820 in$="":poke198,.:print"[154][164]";
  77. 830 wait198,15:getz$:z=asc(z$):ifz>218then830
  78. 840 zl=len(in$):ifzl>lnthen860
  79. 850 ifz>31thenin$=in$+z$:print"[157]"z$"[164]";:goto830
  80. 860 ifz=13thenprint"[157] ":in=val(in$):return
  81. 870 ifz=20andzlthenin$=left$(in$,zl-1):print"[157][157][164] [157]";
  82. 880 goto830
  83. 890 rem put messages and other junk onto the screen
  84. 900 sysmt+9,208
  85. 910 return
  86. 920 open1,dv,15:open8,dv,2,f$:input#1,e:close8:close1:ifethen940
  87. 930 sys50863,f$,dv
  88. 940 return
  89. 950 print"[147]":sysmt+3,0,39,0,0,111,1:sysmt+3,0,39,1,3,160,7
  90. 960 sysmt+3,0,39,4,4,119,10:print"[158]";
  91. 970 sysmt+18,2,"[211] [204] [201] [195] [203] [211] [200] [207] [215]"
  92. 980 sysbox,0,39,6,6,98,13:sysbox,0,39,18,18,226,5:sysbox,0,0,7,18,225,13
  93. 990 sysbox,39,39,7,17,97,5:sysbox,1,38,7,17,160,3:poke1024+40*6,108
  94. 1000 poke1024+40*7-1,123:poke1024+40*18,124:poke1024+40*19-1,126
  95. 1010 sysbox,0,39,24,24,120,6:sysbox,0,39,21,23,160,14:sysbox,0,39,20,20,121,3
  96. 1020 :print"[154]";:sysmt+15,1,21,"[198]1/[198]2 [208]ic [194]ackground [198]3/[198]4 [208]ic [194]order"
  97. 1030 sysmt+18,22,"[211] [211]ave [208]icture  [209] [209]uit [212]o [204][207][193][196][211][212][193][210]
  98. 1040 [158]mt[170]18,23,"(NULL)(NULL)atnlenval next picture":[158]mt[170]6,208:[142]
  99. 1050 [144]
  100. 1060 [158]box,0,39,21,23,160,14:[153]"cont";:[158]mt[170]18,22,ms$:ms$[178]"":[142]
  101. 1070 [141]1060:[151]198,0:[146]198,15:[161]a$:[142]
  102. 1080 [158]box,30,35,4,14,255,6:[158]box,31,36,3,13,160,13:[153]"print";
  103. 1090 [129]i[178]0[164]8:[158]mt[170]15,32,4[170]i,[196](8[170]i):[130]
  104. 1100 [139]ms$[179][177]""[167][141]1060:[137]1120
  105. 1110 ms$[178]"(NULL)lease (NULL)elect str$esired str$rive":[141]1060
  106. 1120 [158]mt,4,32,35,9,13,1,0:[161]a$:jj[178][197](a$)[170]7:[160]2:[159]2,jj,2:[160]2
  107. 1130 [139]st[167]1120
  108. 1140 [142]
  109. 1160 a$[178]"hello connect":[129]i[178]8[164]9:[160]2:[159]2,i,2:[160]2:[139]st[167]1180
  110. 1170 [160]15:[159]15,i,15,"r0:"[170]a$[170]"="[170]a$:[132]15,er:[160]15:[139]er[178]63[167]1190
  111. 1180 [130]:[153]"load":[128]
  112. 1190 q$[178][199](34):[151]646,[194](53281):[153]"load"
  113. 1200 [153]"loadload"q$a$q$","i
  114. 1210 [153]"run":[151]631,13:[151]632,13:[151]198,2:[128]
  115. 10000 [160]15:[159]15,8,15,"s:slideshow":[160]15:[148]"slideshow",8:[144]
  116.