Next Fractal Explorer: io.txt

Es parte de la publicación: Next Fractal Explorer
Tamaño del archivo: 2655
md5: 541d3428caa26b73bfcdcdf5d5a2f439
#program io
   1 REM This file - io.bas - is part of Next Fractal Explorer
   2 REM Next Fractal Explorer is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   3 REM 
   4 REM This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   5 REM 
   6 REM You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/
   7 REM 
   8 REM  to convert this to banked code LOAD io.bas and then
   9 REM BANK NEW tmpbnk: BANK tmpbnk LINE 1,9999: SAVE "iobanked.bas" BANK tmpbnk: BANK tmpbnk CLEAR
  10 DEFPROC SavePlot(psize,pxmin,pxmax,pymin,pymax,piters,colsdone,savefn$)
  20 DIM p(7): p(1)=psize:p(2)=pxmin:p(3)=pxmax:p(4)=pymin: p(5)=(pymax)
  30 p(6)=piters:p(7)=colsdone
  40 REM the save filename should NOT have the .mnd - it is added here
  45 fullsavefn$= savefn$+".mnd"
  50 SAVE fullsavefn$ DATA p()
  60 IF p(1)=1:
  70 screensave$ = savefn$ +".SL2": SAVE screensave$ LAYER 
  80 ELSE 
  90 screensave$ = savefn$ : PROC saveL2320 (screensave$)
 100 ENDIF 
 110 ENDPROC 
 120 DEFPROC LoadPlot(loadfn$)
 130 REM ON ERROR BANK uibnk PROC ErrorMessage ("Error loading " +" "+loadfn$) : GO TO @endofloadplot
 140 DIM p(7) : LOAD loadfn$ DATA p()
 150 PROC LoadScreen (loadfn$, p(1))
 180 LAYER 1,1
 190 @endofloadplot:
 200 ENDPROC = p
 210 DEFPROC LoadScreen (fn$,res)
 215 scr$ = fn$ ( TO LEN (fn$)-4) : REM the filename without the .mnd extension
 220 REM load a screen - .SL2 if res =1, else by LoadL2320 
 230 LAYER 2,1
 240 BANK uibnk PROC SetL2Res(res)
 250 IF res = 1:
 260 BANK uibnk PROC ClearL2 (0,0): LOAD scr$ +".SL2" LAYER 
 270 ELSE 
 280 BANK uibnk PROC ClearL2320 (0): PROC loadL2320(scr$)
 290 ENDIF 
 300 ENDPROC 
 310 DEFPROC ErrorBeep()
 320 BEEP 0.5,0
 330 ENDPROC 
 340 DEFPROC SaveL2320(fn$)
 350 REM save L2 hires screen from the default banks
 360 FOR b=9 TO 14: SAVE fn$+ STR$ (b)+".sl3" BANK b,0,16384: NEXT b
 370 ENDPROC 
 380 DEFPROC LoadL2320(fn$)
 390 REM load hires screen into the default banks
 400 FOR b=9 TO 14: LOAD fn$ + STR$ (b)+".sl3"  BANK b,0,16384: NEXT b
 410 ENDPROC 
 500 DEFPROC debugmsg(fn$,msg$)
 510 REM write a debug message to a file
 520 REM if the file already exists it will be overwritten
 530 OPEN # 7,"o>"+fn$
 540 PRINT #7; TIME $;" : ";msg$
 550 CLOSE # 7
 560 ENDPROC