home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 10: Diskmags / nf_archive_10.iso / MAGS / STFORMAT / STF34A.MSA / INTRO / INTRODE6.LST < prev    next >
File List  |  1989-04-06  |  21KB  |  652 lines

  1. ' ** Program intro_designer **  Design section of introduction sequences
  2. ' ** WRITTEN BY ANTHONY DANIELS IN DECEMBER 1991 FOR ST FORMAT. ADDRESS :- 83 RIVERVIEW, MELTON, WOODBRIDGE, SUFFOLK, IP12 IQU.
  3. On Break Gosub Quit_com
  4. On Error Gosub Error_message
  5. @Initialise
  6. @Main_program
  7. '
  8. Procedure Quit_com
  9.   Message$="Are you sure you want to QUIT without saving ?"
  10.   @Yes_no(Message$)
  11.   If Yes!=-1
  12.     Setcolor 0,4,4,4
  13.     Setcolor 15,0
  14.     Edit    !(end) this should be changed to system or quit before compiling
  15.   Endif
  16. Return
  17. ' -----------------------------------------------------------------------------
  18. Procedure Initialise
  19.   Setcolor 15,4,4,4          !sets text color (ie. color 1)
  20.   Setcolor 0,0,1,1           !sets background color
  21.   Setcolor 1,1792            !sets highlighted text color (ie. color 2)
  22.   Dim Com(220)               !commands
  23.   Dim Screen_no%(220)        !number values (eg. no. of screen to load/show, pause length etc.).
  24.   Dim Screen_title$(220)     !name ofpicture files on disk
  25.   No_screens%=Fre(O)/35066   !checks computers memory and calculates no. of screens which may be held in memory
  26.   Print No_screens%
  27.   Com_selected=1             !command number currently being edited
  28.   Com_pos=10                 !ie. showing commands 1 to 20. (eg. when com_pos=40 commands 31 to 50 are shown).
  29.   Com_line=1                 !no. of lines down screen to com_selected
  30.   '
  31.   ' const ie the following values are constant and do not change
  32.   V=-2        ! adjustment to v(n) values so text in the right position
  33.   H=2         !     ""        h(n)   ""          ""           ""
  34.   Dim H(7)
  35.   Data 26,145,195,245,295,171,221
  36.   ' h   1   2   3   4   5   6   7
  37.   For N=1 To 7
  38.     Read Horiz
  39.     H(N)=Horiz
  40.   Next N
  41.   Dim V(30)
  42.   '
  43.   For N=1 To 200
  44.     Com(N)=0               !reset commands
  45.   Next N
  46. Return
  47. ' --------------------------------------------------------------------------
  48. Procedure B         !clears input area at the bottom of the screen
  49.   Deffill 0
  50.   Pbox 0,177,319,199
  51. Return
  52. ' -----------------------------------------------------------------------------
  53. Procedure Set_up_display
  54.   Cls
  55.   For N=1 To 25
  56.     V(N)=N*8                      !sets verticle text positions
  57.     Draw 0,V(N) To 319,V(N)       !draws parrallel lines
  58.   Next N
  59.   Color 0
  60.   Draw 0,V(1) To 319,V(1)         !erase a line
  61.   Color 1
  62.   @B
  63.   Box 0,0,319,200-8*3             !boarder
  64.   For N=1 To 5
  65.     Draw H(N),0 To H(N),V(22)     !verticle lines
  66.   Next N
  67.   Draw H(6),V(14) To H(6),V(22)
  68.   Draw H(7),V(10) To H(7),V(14)
  69.   Deftext 1,0,0,6
  70.   Text H(1)+8,12,"COMMANDS LIST"
  71.   Deftext 1,0,0,4
  72.   Text 0+H,V(1)+V,"COM-"
  73.   Text 0+H,V(2)+V,"MAND"
  74.   Text H(5)+2,V(1)+V,22,"SEC-"
  75.   Text H(5)+2,V(2)+V,22,"TION"
  76.   '
  77.   Text H(2)+H+2,V(1)+V,42,"PICTURE"
  78.   Text H(2)+H+2,V(2)+V,42,"OPTIONS"
  79.   Text H(3)+H+2,V(1)+V,42,"SAMPLE"
  80.   Text H(3)+H+2,V(2)+V,42,"OPTIONS"
  81.   Text H(4)+H,V(1)+V,46,"SEQUENCE"
  82.   Text H(4)+H+2,V(2)+V,42,"OPTIONS"
  83.   Deftext 1,1,0,4              !bold
  84.   Restore Coloum_titles        !ie restore data from here onwards
  85.   Coloum_titles:
  86.   Data LOAD,SHOW,PAUSE,GOTO,CLS,SCROLL,FADE
  87.   For N=1 To 7
  88.     Read Lable$
  89.     Text H(2)+H+1,V(2+N)+V,45,Lable$       !PRINT PICTURE OPTIONS LIST
  90.   Next N
  91.   Data LOAD,PLAY,SPEED
  92.   For N=1 To 3
  93.     Read Lable$
  94.     Text H(3)+H+1,V(2+N)+V,45,Lable$       !PRINT SAMPLE OPTIONS LIST
  95.   Next N
  96.   Data LOAD,SAVE,MERGE,CLEAR ALL,MEMORY?,INSERT,DELETE,PRINT,,,,QUIT
  97.   For N=1 To 12
  98.     Read Lable$
  99.     Text H(4)+H+1,V(2+N)+V,45,Lable$       !PRINT SEQUENCE OPTIONS LIST
  100.   Next N
  101.   For N=1 To 8
  102.     Text H(2)+H+8,V(14+N)+V,N              !print 1 to 8 by miniscreen
  103.   Next N
  104.   Pbox H(6)+1,V(14)+1,H(5)-1,V(22)-1       !clear miniscreen
  105.   Deftext 1,0,0,4
  106.   Sget Display$
  107. Return
  108. ' -----------------------------------------------------------------------------
  109. Procedure Com_text           !(needs to be faster!)
  110.   Local Line
  111.   For Line=1 To 20                 !ie. lines down screen for coms
  112.     Com_no=Com_pos-10+Line         !the com number for the line
  113.     If Com_no=Com_selected
  114.       Deftext 2,0,0,4          !so text is printed in red (or color 2)
  115.     Else
  116.       Deftext 1,0,0,4          !normal color
  117.     Endif
  118.     H=2
  119.     Text H+2,V((Line)+2)-2,"000"     !}
  120.     If Com_no<10                     !}   adjust so number like 4 appear as 004
  121.       H=H+6                          !}
  122.     Endif                            !}
  123.     If Com_no<100                    !}
  124.       H=H+6                          !}
  125.     Endif
  126.     Text H+2,V(Line+2)+V,Com_no     ! PRINT THE COM NUMBERS DOWN THE LEFT EDGE
  127.     Text H(1)+1,V(Line+2)+V,Space$(19)    !erase previous text
  128.     Text H(1)+113,V(Line+2)+V," "
  129.     H=2
  130.     Screen_no$=Str$(Screen_no%(Com_no))
  131.     Com_text$=""
  132.     If Com(Com_no)=1 Or Com(Com_no)=1+12      !load pic or sample
  133.       Com_text$="LOAD "+Screen_title$(Com_no)+Space$(13-Len(Screen_title$(Com_no)))+Str$(Screen_no%(Com_no))
  134.       '      Text H(1)+H+111,V(Line+2)+V,Screen_no%(Com_no)
  135.     Endif
  136.     If Com(Com_no)=2   !ie show
  137.       Name$=""
  138.       For Q=Com_no Downto 1
  139.         If Com(Q)=1               ! load a picture
  140.           If Screen_no%(Q)=Screen_no%(Com_no)
  141.             Name$=Screen_title$(Q)
  142.             Q=1
  143.           Endif
  144.         Endif
  145.       Next Q
  146.       Com_text$="SHOW "+Name$+Space$(13-Len(Name$))+Str$(Screen_no%(Com_no))
  147.       '      Text H(1)+H+111,V(Line+2)+V,Screen_no%(Com_no)
  148.     Endif
  149.     If Com(Com_no)=2+12      !ie play
  150.       Name$=""
  151.       For Q=Com_no Downto 1
  152.         If Com(Q)=1+12       !ie load a sample
  153.           If Screen_no%(Q)=Screen_no%(Com_no)
  154.             Name$=Screen_title$(Q)
  155.             Q=1
  156.           Endif
  157.         Endif
  158.       Next Q
  159.       Com_text$="PLAY "+Name$+Space$(13-Len(Name$))+Str$(Screen_no%(Com_no))
  160.       '      Text H(1)+H+111,V(Line+2)+V,Screen_no%(Com_no)
  161.     Endif
  162.     If Com(Com_no)=3
  163.       Screen_no$=Str$(Screen_no%(Com_no))
  164.       Seconds$=Str$(Trunc(Screen_no%(Com_no)/50)+0.5)
  165.       Com_text$="PAUSE "+Screen_no$+"  ("+Seconds$+"s)"
  166.     Endif
  167.     If Com(Com_no)=4
  168.       Com_text$="GOTO "+Screen_no$
  169.     Endif
  170.     If Com(Com_no)=5
  171.       Red=Screen_no%(Com_no)/256
  172.       Green=Frac(Red)*16
  173.       Blue=Frac(Green)*16
  174.       Red$=Str$(Trunc(Red))
  175.       Green$=Str$(Trunc(Green))
  176.       Blue$=Str$(Trunc(Blue))
  177.       Rgb$=" ("+Red$+", "+Green$+", "+Blue$+")."
  178.       Com_text$="CLS "+Screen_no$+Rgb$
  179.     Endif
  180.     If Com(Com_no)=6
  181.       If Screen_no%(Com_no)=0
  182.         Com_text$="Scroll OFF."
  183.       Else
  184.         Com_text$="Scroll ON. Step="+Str$(Screen_no%(Com_no))
  185.       Endif
  186.     Endif
  187.     If Com(Com_no)=7
  188.       If Screen_no%(Com_no)=0
  189.         Com_text$="Fade OFF."
  190.       Else
  191.         Com_text$="Fade ON. Speed="+Str$(Screen_no%(Com_no))
  192.       Endif
  193.     Endif
  194.     If Com(Com_no)=15
  195.       Com_text$="Sample speed = "+Str$(Screen_no%(Com_no))
  196.     Endif
  197.     '
  198.     Text H(1)+H,V(Line+2)+V,Com_text$          !print the command text
  199.     If Print_coms!=True
  200.       Lprint Com_no'
  201.       Lprint Com_text$
  202.     Endif
  203.     If Line*10=Com_pos
  204.       Deftext 2,0,0,4
  205.     Else
  206.       Deftext 1,0,0,4
  207.     Endif
  208.     Text 299,V((Line)+2)-2,Line*10      !print positions down right
  209.   Next Line
  210.   H=2
  211.   Deftext 1,0,0,4
  212. Return
  213. ' -----------------------------------------------------------------------------
  214. Procedure Com_select
  215.   If Mousex<H(2) And Mousey>V(2) And Mousey<V(22)
  216.     @Line
  217.     Com_line=Line
  218.     Com_selected=Com_pos-10+Com_line
  219.   Endif
  220. Return
  221. ' -----------------------------------------------------------------------------
  222. Procedure Com_load_pic
  223.   Local Name$
  224.   Repeat
  225.     Text H,V(23)+V,"Return to get fileselect box. Enter pic name :-"
  226.     Repeat
  227.       Valid!=-1
  228.       Print At(1,24);      !position cursor for input
  229.       Input Name$
  230.       @B                   !(clear input area)
  231.       If Name$=""          !ie if return pressed
  232.         Fileselect "*.p?1","",Name$
  233.       Endif
  234.       If Len(Name$)>12
  235.         Text H,V(23)+V,"Name too long. Must be 8 characters + . + extension."
  236.         Valid!=0              !ie not valid
  237.       Endif
  238.       '      Spaces!=0
  239.       For N=1 To 12
  240.         If Mid$(Name$,N,1)=" "
  241.           Text H,V(23)+V,"Spaces not allowed in a filename. Please re-enter :-"
  242.           Valid!=0
  243.           '          Spaces!=-1
  244.         Endif
  245.       Next N
  246.     Until Valid!=-1      !Len(Name$)=<12 And Spaces!=0
  247.   Until Len(Name$)>0     !(=name$<>"") this repeat loop is so cancel of fileselect can be used
  248.   Text H,V(23)+V,"Load into which screen memory (1 to "
  249.   Text H+216,V(23)+V,No_screens%
  250.   Text H+234,V(23)+V,") :-"
  251.   Screen_title$(Com_selected)=Name$
  252.   Min=1                  !minimum number for screen_no%(memory_bank)
  253.   Max=No_screens%        !max          ""
  254. Return
  255. ' -----------------------------------------------------------------------------
  256. Procedure Com_show
  257.   Text H,V(23)+V,"Enter the pictures number, 1 to"
  258.   Text H+33*6,V(23)+V,No_screens%
  259.   Text H+39*6,V(23)+V,":-  "
  260.   Min=1
  261.   Max=No_screens%
  262. Return
  263. ' -----------------------------------------------------------------------------
  264. Procedure Com_pause
  265.   Text H,V(23)+V,"Enter the pause length in 50 th's of a second :-"
  266.   Min=0
  267.   Max=180000        !ie 1 hour
  268. Return
  269. ' -----------------------------------------------------------------------------
  270. Procedure Com_goto
  271.   Text H,V(23)+V,"Enter the command number to goto :-"
  272.   Min=1
  273.   Max=210
  274. Return
  275. ' -----------------------------------------------------------------------------
  276. Procedure Com_cls
  277.   Min=0
  278.   Max=7
  279.   Text H,V(23)+V,"Enter the red value of the color to clear screen to :-"
  280.   '  Print At(1,24);
  281.   @Read_num(Min,Max)
  282.   Red=Read_number
  283.   Text H,V(23)+V,"Enter the green value of the color to clear screen to :-"
  284.   '  Print At(1,24);
  285.   @Read_num(Min,Max)
  286.   Green=Read_number
  287.   Text H,V(23)+V,"Enter the blue value of the color to clear screen to :-"
  288.   '  Print At(1,24);
  289.   @Read_num(Min,Max)
  290.   Blue=Read_number
  291.   Screen_no%(Com_selected)=Red*256+Green*16+Blue      !calculate color as one number (as screen_no% stores it)
  292. Return
  293. ' -----------------------------------------------------------------------------
  294. Procedure Com_scroll
  295.   Text H,V(23)+V,"Enter the step value for the scrolling (0 for off) :-"
  296.   Min=-300
  297.   Max=300
  298. Return
  299. ' -----------------------------------------------------------------------------
  300. Procedure Com_fade
  301.   Text H,V(23)+V,"Enter speed for fading [1=fast] (0 for off) :-"
  302.   Min=0
  303.   Max=100000
  304. Return
  305. ' -----------------------------------------------------------------------------
  306. Procedure Line
  307.   Line=(Mousey-16)/8
  308.   Line=Trunc(Line)+1
  309. Return
  310. ' -----------------------------------------------------------------------------
  311. Procedure Picture_options
  312.   If Mousex>H(2) And Mousex<H(3) And Mousey>V(2) And Mousey<V(9)
  313.     @Line
  314.     Com(Com_selected)=Line
  315.     On Line Gosub Com_load_pic,Com_show,Com_pause,Com_goto,Com_cls,Com_scroll,Com_fade
  316.     If Com(Com_selected)<>5       !as color has already been entered for com(5) in cls
  317.       @Read_num(Min,Max)
  318.       Screen_no%(Com_selected)=Read_number
  319.       @B
  320.     Endif
  321.     Inc Com_selected       !move down to next com
  322.   Endif
  323. Return
  324. ' -----------------------------------------------------------------------------
  325. Procedure Com_load_sample
  326.   Local Name$
  327.   Repeat
  328.     Text H,V(23)+V,"Return to get fileselect box. Enter sample name :-"
  329.     Repeat
  330.       Valid!=-1
  331.       Print At(1,24);      !position cursor for input
  332.       Input Name$
  333.       @B                   !(clear input area)
  334.       If Name$=""          !ie if return pressed
  335.         Fileselect "*.spl","",Name$
  336.       Endif
  337.       If Len(Name$)>12
  338.         Text H,V(23)+V,"Name too long. Must be 8 characters + . + extension."
  339.         Valid!=0              !ie not valid
  340.       Endif
  341.       For N=1 To 12
  342.         If Mid$(Name$,N,1)=" "
  343.           Text H,V(23)+V,"Spaces not allowed in a filename. Please re-enter :-"
  344.           Valid!=0
  345.         Endif
  346.       Next N
  347.     Until Valid!=-1      !Len(Name$)=<12 And Spaces!=0
  348.   Until Len(Name$)>0     !(=name$<>"") this repeat loop is so cancel of fileselect can be used
  349.   Text H,V(23)+V,"Load into which sample memory (1 to "
  350.   Text H+216,V(23)+V,No_screens%
  351.   Text H+234,V(23)+V,") :-"
  352.   Screen_title$(Com_selected)=Name$
  353.   Min=1                  !minimum number for screen_no%(memory_bank)
  354.   Max=No_screens%        !max          ""
  355. Return
  356. ' -----------------------------------------------------------------------------
  357. Procedure Com_play
  358.   Text H,V(23)+V,"Enter the samples number, 1 to"
  359.   Text H+33*6,V(23)+V,No_screens%
  360.   Text H+39*6,V(23)+V,":-  "
  361.   Min=1
  362.   Max=No_screens%
  363. Return
  364. ' -----------------------------------------------------------------------------
  365. Procedure Com_set_speed
  366.   Text H,V(23)+V,"Enter speed setting for sample playback, 0 to 7 : "
  367.   Min=0
  368.   Max=7
  369. Return
  370. ' -----------------------------------------------------------------------------
  371. Procedure Sample_options
  372.   If Mousex>H(3) And Mousex<H(4) And Mousey>V(2) And Mousey<V(5)
  373.     '    Text H,V(24)+V,"Currently unavailable. Wait for next version!"
  374.     @Line
  375.     Com(Com_selected)=Line+12           !ie there are 12 pic options
  376.     On Line Gosub Com_load_sample,Com_play,Com_set_speed
  377.     @Read_num(Min,Max)
  378.     Screen_no%(Com_selected)=Read_number
  379.     @B
  380.     Inc Com_selected
  381.   Endif
  382. Return
  383. ' -----------------------------------------------------------------------------
  384. Procedure Sequence_options
  385.   If Mousex>H(4) And Mousex<H(5) And Mousey>V(2) And Mousey<V(15)
  386.     @Line
  387.     On Line Gosub Loading_sequence,Saving_sequence,Merge_sequence,Clear_all,Check_memory,Insert_com,Delete_com,Print_com,B,B,B,Quit_com
  388.   Endif
  389. Return
  390. ' -----------------------------------------------------------------------------
  391. Procedure Highest_com          !finds the highest_com number you've used. ie total number of coms
  392.   For N=210 Downto 1
  393.     If Com(N)<>0
  394.       Highest_com=N
  395.       N=1                      !finish searching as highest found
  396.     Endif
  397.   Next N
  398. Return
  399. ' -----------------------------------------------------------------------------
  400. Procedure Saving_sequence
  401.   Com_selected=1
  402.   @Highest_com
  403.   Fileselect "*.itr","",Sav_me$
  404.   Message$="Save current sequence as "+Sav_me$+" (y if yes)?"
  405.   @Yes_no(Message$)
  406.   If Yes!=0
  407.     Sav_me$=""
  408.   Endif
  409.   If Sav_me$<>""
  410.     Open "o",#1,Sav_me$
  411.     Total_commands%=Highest_com
  412.     '    No_loadscrn%=8
  413.     Write #1,Total_commands%
  414.     '    Write #1,No_loadscrn%
  415.     For Com_no%=1 To Total_commands%
  416.       Write #1,Com(Com_no%)
  417.       Write #1,Screen_no%(Com_no%)
  418.       If Com(Com_no%)=1 Or Com(Com_no%)=12+1   !if load_pic or load_sample
  419.         Write #1,Screen_title$(Com_no%)
  420.       Endif
  421.     Next Com_no%
  422.     Close #1
  423.   Endif
  424. Return
  425. ' -----------------------------------------------------------------------------
  426. Procedure Loading_sequence
  427.   Local E%
  428.   Fileselect "*.itr","",Lod_me$
  429.   Message$="Load sequence called "+Lod_me$+" (y if yes)?"
  430.   @Yes_no(Message$)
  431.   If Yes!=0
  432.     Lod_me$=""
  433.   Endif
  434.   If Lod_me$<>""
  435.     For E%=0 To 210
  436.       Com(E%)=0
  437.     Next E%
  438.     Highest_com=0
  439.     Open "i",#1,Lod_me$     !"a:exampl2.itr"
  440.     Input #1,Total_commands%
  441.     '    Input #1,No_loadscrn%
  442.     For Com_no%=1 To Total_commands%
  443.       Input #1,Com(Com_no%)
  444.       Input #1,Screen_no%(Com_no%)
  445.       If Com(Com_no%)=1 Or Com(Com_no%)=12+1
  446.         Input #1,Screen_title$(Com_no%)
  447.       Endif
  448.     Next Com_no%
  449.     Close #1
  450.   Endif
  451. Return
  452. '
  453. Procedure Merge_sequence                !can also be used to cut, copy, paste, move etc.
  454.   Local Merge_pos,Lod_me$,Total_commands%,Counter,N
  455.   Text 0,V(23)+V,319,"Enter position where you want to insert (merge) a file"
  456.   @Read_num(1,199)
  457.   Merge_pos=Read_number
  458.   Fileselect "*.itr","",Lod_me$
  459.   @B
  460.   Merge_pos$=Str$(Merge_pos)
  461.   Message$="Merge sequence called "+Lod_me$+" at "+Merge_pos$+" (y if yes)?"
  462.   @Yes_no(Message$)
  463.   If Yes!=0
  464.     Lod_me$=""
  465.   Endif
  466.   @B
  467.   Text H,V(23)+V,"Please wait...."
  468.   If Lod_me$<>""
  469.     Open "i",#1,Lod_me$
  470.     Input #1,Total_commands%
  471.     For Counter=1 To Total_commands%
  472.       @Highest_com
  473.       For N=Highest_com Downto Merge_pos
  474.         Com(N+1)=Com(N)
  475.         Screen_no%(N+1)=Screen_no%(N)
  476.         Screen_title$(N+1)=Screen_title$(N)
  477.       Next N
  478.     Next Counter
  479.     '    Input #1,No_loadscrn%
  480.     For Com_no%=Merge_pos To Total_commands%+Merge_pos-1
  481.       Input #1,Com(Com_no%)
  482.       Input #1,Screen_no%(Com_no%)
  483.       If Com(Com_no%)=1 Or Com(Com_no%)=12+1
  484.         Input #1,Screen_title$(Com_no%)
  485.       Endif
  486.     Next Com_no%
  487.     Close #1
  488.   Endif
  489.   '  @Highest_com
  490. Return
  491. ' -----------------------------------------------------------------------------
  492. Procedure Clear_all
  493.   Message$="Completely clear current sequence from memory (yes) ?"
  494.   Text H,V(23)+V,"Completely clear current sequence from memory (yes) ?"
  495.   @Yes_no(Message$)
  496.   If Yes!=-1
  497.     For N=1 To 200
  498.       Com(N)=0
  499.     Next N
  500.   Endif
  501. Return
  502. '
  503. Procedure Check_memory
  504.   Local Mem,Com_no
  505.   Memory_used%=0
  506.   Erase Screen_memory!()
  507.   Dim Screen_memory!(No_screens%)
  508.   For Mem=1 To No_screens%
  509.     Screen_memory!(Mem)=False
  510.   Next Mem
  511.   For Com_no=210 Downto 1
  512.     If Com(Com_no)=1             !command is load
  513.       Screen_memory!(Screen_no%(Com_no))=True
  514.     Endif
  515.   Next Com_no
  516.   For N=1 To No_screens%
  517.     If Screen_memory!(N)=True
  518.       Memory_used%=Memory_used%+32066
  519.     Endif
  520.   Next N
  521.   Text H,V(23)+V,"MEMORY USED (FOR PICS) : "+Str$(Memory_used%)
  522.   Text H,V(24)+V,"MEMORY FREE (bytes)    : "+Str$(Fre(O)-Memory_used%)
  523.   Repeat
  524.   Until Inkey$<>"" Or Mousek<>0
  525. Return
  526. ' -----------------------------------------------------------------------------
  527. Procedure Insert_com
  528.   Text H,V(23)+V,"Enter position where you want to insert a command :-"
  529.   Print At(1,24);
  530.   @Read_num(1,199)
  531.   Insert_pos=Read_number
  532.   For N=199 Downto Insert_pos
  533.     Com(N+1)=Com(N)                          !shift commands down
  534.     Screen_no%(N+1)=Screen_no%(N)
  535.     Screen_title$(N+1)=Screen_title$(N)
  536.   Next N
  537.   Com(Insert_pos)=0                         !clear this com
  538.   ' @Com_text
  539. Return
  540. ' -----------------------------------------------------------------------------
  541. Procedure Delete_com
  542.   Text H,V(23)+V,"Enter position where you want to delete a command"
  543.   Print At(1,24);
  544.   @Read_num(1,200)
  545.   Delete_pos=Read_number
  546.   For N=Delete_pos To 199
  547.     Com(N)=Com(N+1)                       !shift commands back one
  548.     Screen_no%(N)=Screen_no%(N+1)
  549.     Screen_title$(N)=Screen_title$(N+1)
  550.   Next N
  551.   @Com_text
  552. Return
  553. ' -----------------------------------------------------------------------------
  554. Procedure Print_com
  555.   Print_coms!=True
  556.   @Com_text
  557.   Print_coms!=False
  558. Return
  559. ' -----------------------------------------------------------------------------
  560. Procedure Com_position
  561.   Line=(Mousey-16)/8
  562.   Line=Trunc(Line)+1
  563.   Com_pos=Line*10
  564.   Com_selected=Com_pos+Com_line-10
  565. Return
  566. ' -----------------------------------------------------------------------------
  567. Procedure Main_program
  568.   @Set_up_display
  569.   @Com_text
  570.   '  Deftext 1,0,0,4
  571.   Text 46,V(24)+V,228,"RIGHT CLICK TO RE-DRAW SCREEN DISPLAY!"
  572.   Do
  573.     If Mousek=2              !right click
  574.       Sput Display$          !re-draw display
  575.       @Com_text
  576.       Text 46,V(24)+V,228,"RIGHT CLICK TO RE-DRAW SCREEN DISPLAY!"
  577.     Endif
  578.     If Mousek=1              !left click
  579.       @B
  580.       If Mousex<H(2)
  581.         @Com_select
  582.       Else
  583.         If Mousex<H(3)
  584.           @Picture_options
  585.         Else
  586.           If Mousex<H(4)
  587.             @Sample_options
  588.           Else
  589.             If Mousex<H(5)
  590.               @Sequence_options
  591.             Else
  592.               @Com_position              !ie mousex>=h(5)
  593.             Endif
  594.           Endif
  595.         Endif
  596.       Endif
  597.       @Com_text
  598.       @B
  599.       Text 46,V(24)+V,228,"RIGHT CLICK TO RE-DRAW SCREEN DISPLAY!"
  600.     Endif
  601.   Loop
  602. Return
  603. ' -----------------------------------------------------------------------------
  604. Procedure Read_num(Minimum,Maximum)
  605.   Repeat
  606.     Print At(1,24);
  607.     Input Number$
  608.     Read_number=Val(Number$)
  609.     If Read_number<Minimum Or Read_number>Maximum
  610.       @B
  611.       Text H,V(23)+V,"Number out of range ("
  612.       Text H+28*6,V(23)+V,Minimum
  613.       Text H+31*6,V(23)+V,"to"
  614.       Text H+38*6,V(23)+V,Maximum
  615.       Text H+45*6,V(23)+V,") :-"
  616.     Endif
  617.   Until Read_number>=Minimum And Read_number=<Maximum
  618. Return
  619. '
  620. Procedure Error_message
  621.   For N=1 To 50
  622.     Col=Trunc(Rnd*1911)
  623.     Setcolor 0,Col
  624.   Next N
  625.   Setcolor 0,0
  626.   @B
  627.   Cls
  628.   Text H,V(1)+V,"An error has occured."
  629.   Text H,V(2)+V,"If you have found a bug please contact :-"
  630.   Text H,V(4)+V,"Anthony Daniels, 83 Riverview, Melton, Woodbridge,"
  631.   Text H,V(5)+V,"Suffolk, IP12 1QU."
  632.   Text H,V(7)+V,"Send a disk and S.A.E. for upgrade."
  633.   Text H,V(9)+V,"Press a key to continue"
  634.   Repeat
  635.   Until Inkey$<>""
  636.   Sput Display$
  637.   @Com_text
  638. Return
  639. ' -----------------------------------------------------------------------------
  640. Procedure Yes_no(Info$)
  641.   @B
  642.   Text H,V(23)+V,Info$
  643.   Yes!=0
  644.   Print At(1,24);
  645.   Input Yes_no$
  646.   Yes_no$=Upper$(Yes_no$)
  647.   If Yes_no$="Y" Or Yes_no$="YES" Or Yes_no$="Y "
  648.     Yes!=-1
  649.   Endif
  650. Return
  651. ' -----------------------------------------------------------------------------
  652.