home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / 401-425 / apd425 / sources / ampp.asc < prev    next >
Text File  |  1991-09-09  |  52KB  |  1,892 lines

  1. '
  2. '     The (Am)os (P)ainting (P)ackage,   AmPP    by Mark Burbidge. 
  3. '                    Version 0.9 
  4. '
  5. '    This is my second Amos program, my first was AMOS-BROT, 
  6. '  which came packaged with the ConvFormat Utility also.   
  7. '  
  8. '  This pre-release was finished in under a week, on the 23rd August 1991
  9. '  It has all features enabled except text and magnify.
  10. '
  11. '  Actually, I never got around to releasing it as I got a job in
  12. '  September, went to University in October (Birmingham, Physics) and
  13. '  have only just come back. As a 'new user' to my own program (it's 
  14. '  a long time) I've ironed out some little foibles, and will release
  15. '  this version, all release notes the same inc. Version number. 
  16. '
  17. '  AmPP, as with my previous release AMOS-BROT and CONVFORMAT is freely
  18. '  distributable, as long as all Docs and Rem statements remain intact.  
  19. '  It can be updated as long as the original is included in your release.
  20. '  The `disk' in `diskware' means that if you use it then send me a disk   
  21. '  with some Public Domain on it. I'll send your disk back A.S.A.P. with 
  22. '  some other PD. NO OBLIGATION. NO PIRATES. Archive the disk where possible.  
  23. '  Please specify archiving program. 
  24. '
  25. '  My Address is 107 Heron Rd. Larkfield, Kent, ME 20 6JL. 
  26. '
  27. '               signed 
  28. '
  29. '                      Mark Burbidge.    
  30. '
  31. '
  32. '  
  33. '  UPDATERS ONLY - Always work on a backup of this source. 
  34. '
  35. '  The Panel icons and About screen are in permenant banks, ie they are  
  36. '  saved with the program. If you change the panel/about, LEAVE MY CREDIT, then
  37. '  change ABOT and PANEL to false initially,  take away the comma from the   
  38. '  reserve below, and also remove the comma for the CLEARMEM   
  39. '  Run the program, change it all back, as below, and then save it off.
  40. '  The Banks will be saved too. Panel.abk must be taken from a picture by
  41. '  the GET ICON command, to work without program modification. 
  42. '
  43. '  If you do need to do the above, if you change the ToolBox, then don't 
  44. '  forget to run ALL sections whose memory banks are to be saved with the  
  45. '  program, the the first version you should call the ABOUT procedure. 
  46. '  If you fail to do this, when you change the parameters back as described
  47. '  and usually a few sessions later, you will get an error when the procedure
  48. '  is run. In the case of ABOUT the error occurs on the line Unpack 10 to 2
  49. '
  50. Set Buffer 15
  51. Auto View Off 
  52. Default 
  53. Palette 0,0
  54. Auto View On 
  55. 'CLEARMEM
  56. 'Reserve As Data 10,7060 
  57. Reserve As Work 9,15000 : Rem **** This mustn't be REM 
  58. Rem ****** Global Variables *******
  59. Flash Off 
  60. Global WIDTH,HEIGHT,CLR,CURCOL,PALFOR,PALBAK,INITFOR,INITBAK,REQON,MSTORE
  61. Global CLGO,OPEN,CLPAL,TTOOLS,PANEL,CURROP,FIN,PAL,NOW,FXIT,WONCE,BUT,ABOT
  62. Global VDIV,HDIV,BON,DPT,IT,INBOB,ST_AMAL,AMLON,FX,CLRSB
  63. WIDTH=320 : HEIGHT=256 : CLR=16 : MSTORE=2 : NOW=False : OPEN=False
  64. CURCOL=2 : ABOT=True : PANEL=True : FIN=False : CURROP=1 : CLPAL=True
  65. CLGO=False : BON=True : DPT=5 : IT=20 : INBOB=False : AMLON=False
  66. ST_AMAL=False : OLOP=1 : FX=False : CLRSB=Colour(0)
  67. INITFOR=0 : INITBAK=2 : Rem ** Done this way so DEFPAL returns to original** 
  68. PALFOR=INITFOR : PALBAK=INITBAK : REQON=True : TTOOLS=True : WONCE=True
  69. '
  70. '
  71. Rem ***** Program Start *****
  72. REQON=False
  73. SCRMODE
  74. Limit Mouse 
  75. REQON=True
  76. DEFMENU
  77. TTOOLBOX
  78. Change Mouse MSTORE
  79. Rem ****** I realise much of this should be in a procedure, so what? *** 
  80. Repeat 
  81.    If NOW
  82.       If Not CLPAL
  83.          Reserve Zone 17
  84.       End If 
  85.    End If 
  86.    OK=False
  87.    If CLPAL
  88.       If CLGO
  89.          OK=True
  90.          CLGO=False
  91.          If TTOOLS
  92.             NOW=True
  93.          End If 
  94.          Reserve Zone 17+CLR
  95.       End If 
  96.    End If 
  97.    If NOW : Rem ****** Set up Panel icons ****** 
  98.       Menu Off 
  99.       NOW=False
  100.       TP=229
  101.       If WIDTH>320
  102.          SCL=2
  103.       Else 
  104.          SCL=1
  105.       End If 
  106.       If Not PAL
  107.          TP=TP-64
  108.       End If 
  109.       For T=1 To 6
  110.          Set Zone T,SCL*(223+(T-1)*16),TP To SCL*(222+T*16),TP+15
  111.          Set Zone T+6,SCL*(223+(T-1)*16),TP+16 To SCL*(222+T*16),TP+31
  112.       Next T
  113.       Set Zone 13,1,TP+2 To SCL*10,TP+10
  114.       Set Zone 14,125*SCL,TP To 180*SCL,HEIGHT
  115.       Set Zone 15,1,TP+20 To SCL*10,HEIGHT-2
  116.       Set Zone 16,179,TP+20 To SCL*187,HEIGHT-2
  117.       Set Zone 17,188,TP+20 To SCL*196,HEIGHT-2
  118.       Menu On 
  119.    End If 
  120.    If OK
  121.       Menu Off 
  122.       For I=0 To CLR-1
  123.          XP=1+(I mod VDIV)*(80/VDIV)
  124.          YP=1+(I/VDIV)*(80/HDIV)
  125.          Ink I
  126.          XP2=XP+(80/VDIV)-2
  127.          YP2=YP+(80/HDIV)-2
  128.          Set Zone I+18,XP,YP To XP2,YP2
  129.       Next I
  130.       Menu On 
  131.    End If 
  132.    Rem ********* end of the `procedure' stuff ***** 
  133.    Rem ********* Now for the stuff which should be here ***** 
  134.    Rem ********* The above isn't executed every loop ****** 
  135.    Rem ********* only when the panel or colour box is turned on ******  
  136.    BUT=Mouse Key
  137.    BUTTON=False
  138.    If BUT=1
  139.       BUTTON=True
  140.    Else 
  141.       If BUT>2
  142.          BUTTON=True : Rem Done like this to allow for 3rd button 
  143.       End If : Rem If available. Instead of right and left.(line & filled)  
  144.    End If 
  145.    If BUTTON : Rem  **** If Mouse used used then go to Panel testing**  
  146.       Z=Mouse Zone : Rem *** and drawing control procedure ***
  147.       TESTALL[Z]
  148.    End If 
  149.    FXIT=Choice : Rem Here's that fix again, to make more than one menu work 
  150.    If FXIT
  151.       ACTION
  152.    End If 
  153.    Screen 0
  154.    If INBOB
  155.       If AMLON or Not(OLOP=CURROP)
  156.          If Not(CURROP=11)
  157.             Bob Update Off : Bob Clear : AMLON=False : ST_AMAL=True
  158.          Else 
  159.             If CURROP=11
  160.                If ST_AMAL
  161.                   If FX
  162.                      Bob Draw : Bob Update On 
  163.                   Else 
  164.                      Bob 1,X Screen(X Mouse),Y Screen(Y Mouse),1
  165.                      Channel 1 To Bob 1
  166.                      G$="AU (I R0<>XS(0,XM) J U I R1<>YS(0,YM) J U X U:"
  167.                      G$=G$+"L R0=XS(0,XM);"
  168.                      G$=G$+"L R1=YS(0,YM); D M) M: M R0-X,R1-Y,1 W;"
  169.                      Amal 1,G$ : Amal On : FX=True
  170.                   End If 
  171.                   AMLON=True
  172.                   ST_AMAL=False
  173.                End If 
  174.             End If 
  175.          End If 
  176.       End If 
  177.    End If 
  178.    OLOP=CURROP
  179. Until FIN
  180. If PANEL
  181.    Reserve Zone 
  182. End If 
  183. If INBOB
  184.    Erase 1
  185. End If 
  186. Erase 9
  187. '
  188. '
  189. '
  190. '
  191. '
  192. '
  193. '
  194. Edit 
  195. Rem **** Procedures **** 
  196. Procedure CLPALETTE
  197.    '
  198.    ' This procedure draws that colourbox, you know that one that you can
  199.    ' In the top left. It also wipes it again, depending on CLPAL. OPEN is 
  200.    ' Global. Initilaised to false at the start. Not accessed elsewhere. 
  201.    '
  202.    Screen 0
  203.    If AMLON
  204.       Bob Update Off 
  205.       Bob Clear 
  206.    End If 
  207.    If CLPAL
  208.       ' Draw the colourbox 
  209.       If Not OPEN
  210.          OPEN=True
  211.          Get Cblock 1,0,0,96,81
  212.          Curs Off 
  213.          Flash Off 
  214.       End If 
  215.       ' Flag to indicate DO COLOURBOX ZONES
  216.       CLGO=True
  217.       Ink PALBAK
  218.       Box 0,0 To 80,80
  219.       Box 80,0 To 88,80
  220.       Ink CURCOL
  221.       Bar 81,1 To 87,79
  222.       Ink PALBAK
  223.       ' I know the next bit is used more than once and should be in a proc 
  224.       ' if it bothers you, you do it, I don't care!
  225.       If CLR=2
  226.          HLINE=2
  227.          VLINE=3
  228.       Else 
  229.          If CLR<16
  230.             HLINE=3
  231.             If CLR=4
  232.                VLINE=3
  233.             Else 
  234.                VLINE=5
  235.             End If 
  236.          Else 
  237.             HLINE=5
  238.             If CLR=16
  239.                VLINE=5
  240.             Else 
  241.                If CLR=32
  242.                   VLINE=9
  243.                Else 
  244.                   VLINE=17
  245.                End If 
  246.             End If 
  247.          End If 
  248.       End If 
  249.       HDIV=HLINE-1
  250.       VDIV=VLINE-1
  251.       For I=0 To HDIV
  252.          Draw 0,I*(80/HDIV) To 80,I*(80/HDIV)
  253.       Next I
  254.       For I=0 To VDIV
  255.          Draw I*(80/VDIV),0 To I*(80/VDIV),80
  256.       Next I
  257.       For I=0 To CLR-1
  258.          XP=1+(I mod VDIV)*(80/VDIV)
  259.          YP=1+(I/VDIV)*(80/HDIV)
  260.          Ink I
  261.          XP2=XP+(80/VDIV)-2
  262.          YP2=YP+(80/HDIV)-2
  263.          Bar XP,YP To XP2,YP2
  264.       Next I
  265.    Else 
  266.       ' Wipe the colourbox 
  267.       CLGO=False
  268.       If OPEN
  269.          Put Cblock 1
  270.          Del Cblock 1
  271.          OPEN=False
  272.       End If 
  273.    End If 
  274.    If AMLON
  275.       Bob Draw 
  276.       Bob Update On 
  277.    End If 
  278. End Proc
  279. Procedure CLPAN
  280.    '
  281.    ' Get rid of the Tollbox. Once is a safeguard, to stop the Screenclose 
  282.    ' being called twice. Did it several times in developement. Shouldn't
  283.    ' happen now though, but I've left it to save upgraders some grief.
  284.    ' Upgraders say thank you!!  Oh by the way. If you Upgrade this program you
  285.    ' MUST DISTRIBUTE the original source unaltered, ie this program, and the
  286.    ' accompanying Docs with your release. 
  287.    '
  288.    If PANEL and Not TTOOLS
  289.       If Not WONCE : Rem *** safeguard against calling twice, causing error *** 
  290.          WONCE=True : Rem ** Pronounced Once *** 
  291.          Screen 0
  292.          Reserve Zone 
  293.          NOW=False
  294.          Screen Close 2
  295.       End If 
  296.    End If 
  297. End Proc
  298. Procedure TTOOLBOX
  299.    '
  300.    ' Display or get rid of that toolbox 
  301.    ' The Exist bit is used when the bank hasn't been saved with the prog. 
  302.    ' PANEL must be initialised to false if this is the case. See the first  
  303.    ' lot of REM statements
  304.    '
  305.    If PANEL or Exist("sources:graphics/panel.abk")
  306.       If TTOOLS
  307.          NOW=True
  308.          WONCE=False
  309.          Screen Open 2,320,30,16,Lowres
  310.          Screen 2
  311.          HERE=270
  312.          If Not PAL
  313.             HERE=HERE-56
  314.          End If 
  315.          Screen Display 2,,HERE,,
  316.          Curs Off 
  317.          Flash Off 
  318.          If Not PANEL
  319.             Load "sources:graphics/panel.abk",2
  320.             PANEL=True
  321.          End If 
  322.          Get Icon Palette 
  323.          Paste Icon 0,0,1
  324.          Colour 0,CLRSB
  325.          CLPALETTE
  326.          TESTALL[CURROP]
  327.       Else 
  328.          CLPALETTE
  329.          NOW=False
  330.          CLPAN
  331.       End If 
  332.    Else 
  333.       TTOOLS=False
  334.       REQ["File Missing","Graphics","Panel.abk"]
  335.    End If 
  336.    DEFMENU
  337. End Proc
  338. Procedure SHICON
  339.    '
  340.    ' This proc displays the selected icon over the top of the Toolbox 
  341.    ' Called only from Testall 
  342.    '
  343.    Paste Icon 203,15,2
  344.    Screen 0
  345. End Proc
  346. Procedure TESTALL[GAD]
  347.    '
  348.    ' This tests the gadgets and calls procedures for the Toolbox. 
  349.    ' It's the Toolbox equivalent of ACTION
  350.    '
  351.    Menu Off 
  352.    Clear Key 
  353.    If Not CLPAL
  354.       If GAD>17
  355.          GAD=0
  356.       End If 
  357.    End If 
  358.    GADGET=GAD>0
  359.    GADGET=GAD<13 and GADGET
  360.    If GADGET
  361.       If TTOOLS
  362.          GADG=True
  363.          CURROP=GAD
  364.          If BON
  365.             Bell 
  366.          End If 
  367.          Screen 2
  368.          Ink 3
  369.          Get Icon 2,2,223+((GAD-1) mod 6)*16,((GAD-1)/6)*16 To 223+(((GAD-1) mod 6)+1)*16,14+((GAD-1)/6)*16
  370.          SHICON
  371.       End If 
  372.    Else 
  373.       If GAD=13
  374.          TTOOLS= Not TTOOLS
  375.          If TTOOLS
  376.             Menu$(1,8)="Toolbox off   <help>"
  377.          Else 
  378.             Menu$(1,8)="Toolbox on    <help>"
  379.          End If 
  380.          TTOOLBOX
  381.       Else 
  382.          If GAD=14
  383.             ABOUT
  384.          Else 
  385.             If GAD=15
  386.                CLPAL= Not CLPAL
  387.                CLPALETTE
  388.                If CLPAL
  389.                   Menu$(1,9)="Colourbox Off   C   "
  390.                Else 
  391.                   Menu$(1,9)="Colourbox On    C   "
  392.                End If 
  393.             Else 
  394.                If GAD=16
  395.                   CLPAL=False
  396.                   TTOOLS=False
  397.                   TTOOLBOX
  398.                   SCRMODE
  399.                   CLPAL=True
  400.                   TTOOLS=True
  401.                   TTOOLBOX
  402.                Else 
  403.                   If GAD=17
  404.                      PAL
  405.                      OPEN=False
  406.                      TTOOLBOX
  407.                   Else 
  408.                      If GAD=0
  409.                         Screen 0
  410.                         If(CURROP=1) or(CURROP=7)
  411.                            SKETCH[CURROP]
  412.                         End If 
  413.                         If CURROP=2
  414.                            BBOX
  415.                         End If 
  416.                         If CURROP=3
  417.                            EELLIPSE
  418.                         End If 
  419.                         If CURROP=4
  420.                            SPRAY
  421.                         End If 
  422.                         If CURROP=5
  423.                            CUT
  424.                         End If 
  425.                         If CURROP=8
  426.                            CCIRCLE
  427.                         End If 
  428.                         If CURROP=9
  429.                            FFILL
  430.                         End If 
  431.                         If CURROP=10
  432.                            LINE
  433.                         End If 
  434.                         If CURROP=11
  435.                            PPASTE
  436.                         End If 
  437.                         If CURROP=5
  438.                            CURROP=11
  439.                            TTOOLBOX
  440.                         End If 
  441.                      Else 
  442.                         If CLPAL
  443.                            CURCOL=GAD-18
  444.                            If OPEN
  445.                               Ink CURCOL
  446.                               Screen 0
  447.                               Bar 81,1 To 87,79
  448.                            End If 
  449.                         End If 
  450.                      End If 
  451.                   End If 
  452.                End If 
  453.             End If 
  454.          End If 
  455.       End If 
  456.    End If 
  457.    Repeat : Rem **** Program moves faster than fingers.
  458.    Until Mouse Key=0 : Rem *** Allow fingers to catch up. 
  459.    CLPALETTE
  460.    Menu On 
  461. End Proc
  462. Procedure DEFMENU
  463.    '
  464.    ' Defines the menu 
  465.    '
  466.    Screen 0
  467.    Menu$(1)="General  "
  468.    Menu$(1,1)="Clear Screen  <esc> "
  469.    Menu Key(1,1) To 69
  470.    Menu$(1,2)="--------------------"
  471.    Menu Inactive(1,2)
  472.    Menu$(1,3)="Load Picture    L   "
  473.    Menu Key(1,3) To 40
  474.    Menu$(1,4)="Save Picture    S   "
  475.    Menu Key(1,4) To 33
  476.    Menu$(1,5)="--------------------"
  477.    Menu Inactive(1,5)
  478.    Menu$(1,6)="Screen Mode     M   "
  479.    Menu Key(1,6) To 55
  480.    Menu$(1,7)="Palette         P   "
  481.    Menu Key(1,7) To 25
  482.    If TTOOLS
  483.       Menu$(1,8)="Toolbox off   <help>"
  484.    Else 
  485.       Menu$(1,8)="Toolbox on    <help>"
  486.    End If 
  487.    Menu Key(1,8) To 95
  488.    If CLPAL
  489.       Menu$(1,9)="Colourbox Off   C   "
  490.    Else 
  491.       Menu$(1,9)="Colourbox On    C   "
  492.    End If 
  493.    Menu Key(1,9) To 51
  494.    Menu$(1,10)="About           A   "
  495.    Menu Key(1,10) To 32
  496.    If BON
  497.       Menu$(1,11)="Bell off        B   "
  498.    Else 
  499.       Menu$(1,11)="Bell on         B   "
  500.    End If 
  501.    Menu Key(1,11) To 53
  502.    Menu$(1,12)="-------------------"
  503.    Menu Inactive(1,12)
  504.    Menu$(1,13)="Quit            Q   "
  505.    Menu Key(1,13) To 16
  506.    Menu$(2)="Panel  "
  507.    Menu$(2,1)="  Sketch  "
  508.    Menu$(2,2)="  Draw    "
  509.    Menu$(2,3)="  Box     "
  510.    Menu$(2,4)="  Circle  "
  511.    Menu$(2,5)="  Ellipse "
  512.    Menu$(2,6)="  Fill    "
  513.    Menu$(2,7)="  Spray   "
  514.    Menu$(2,8)="  Line    "
  515.    Menu$(2,9)="  Cut     "
  516.    Menu$(2,10)="  Paste   "
  517.    Menu$(2,11)="  Zoom    "
  518.    Menu$(2,12)="  Text    "
  519.    Menu$(2,13)="----------------"
  520.    Menu Inactive(2,13)
  521.    Menu$(2,14)="  Arrow   "
  522.    Menu$(2,15)="  Cross   "
  523.    Menu$(2,16)="----------------"
  524.    Menu Inactive(2,16)
  525.    Menu$(2,17)="Spray Size  "+Str$(IT)
  526.    Menu$(2,18)="   Density  "+Str$(DPT)
  527.    Menu On 
  528.    On Menu Proc ACTION
  529.    On Menu On 
  530. End Proc
  531. Procedure CLEARMEM
  532.    '
  533.    ' Clears all memory banks. 
  534.    ' IMPORTANT - Only call when you wish to use a new Toolbox panel 
  535.    ' as described in the initial REM statements. I should have included 
  536.    ' The original Panel file under the name Panel.bak if you need to renew
  537.    ' it.
  538.    '
  539.    For I=1 To 15
  540.       If Length(I)>0
  541.          Erase I
  542.       End If 
  543.    Next I
  544. End Proc
  545. Procedure CHNGVARY[MX]
  546.    Menu Off 
  547.    C1=Colour(1)
  548.    C2=Colour(2)
  549.    Colour 1,$0
  550.    Colour 2,$FFF
  551.    Get Block 1,0,0,WIDTH,16
  552.    Set Slider 1,2,1,1,1,2,1,2
  553.    OLD=-10
  554.    Repeat 
  555.       If Not(OLD=VARY)
  556.          Wait Vbl 
  557.          Hslider 0,0 To WIDTH-100.0,15,50,VARY,1
  558.       End If 
  559.       OLD=VARY
  560.       VARY=50*(((X Screen(X Mouse))/(WIDTH-100.0)))
  561.       If VARY<1
  562.          VARY=1
  563.       End If 
  564.       If VARY>MX
  565.          VARY=MX
  566.       End If 
  567.       Locate X Text(WIDTH-90.0),1
  568.       Print VARY; : Print "  "
  569.    Until Mouse Key>0
  570.    Set Pattern 0
  571.    Put Block 1
  572.    Del Block 1
  573.    Colour 1,C1
  574.    Colour 2,C2
  575.    Menu On 
  576. End Proc[VARY]
  577. Procedure SKETCH[TYPE]
  578.    '
  579.    ' Sketches 
  580.    '
  581.    TMPL=CLPAL
  582.    If TMPL
  583.       CLPAL=False
  584.       CLPALETTE
  585.    End If 
  586.    Ink CURCOL
  587.    X1=X Screen(X Mouse)
  588.    Y1=Y Screen(Y Mouse)
  589.    Repeat 
  590.       Wait Vbl 
  591.       X2=X Mouse : Y2=Y Mouse
  592.       X2=X Screen(X2) : Y2=Y Screen(Y2)
  593.       If TYPE=1
  594.          Plot X2,Y2
  595.       Else 
  596.          Draw X1,Y1 To X2,Y2
  597.          X1=X2
  598.          Y1=Y2
  599.       End If 
  600.    Until Mouse Key=0
  601.    If TMPL
  602.       CLPAL=True
  603.       CLPALETTE
  604.    End If 
  605. End Proc
  606. Procedure BBOX
  607.    '
  608.    ' Does boxes. If you just use the left button they are hollow
  609.    ' but if while drawing your hollow box you press the right button
  610.    ' and then release the left followed by the right you get a solid box. 
  611.    ' You SHOULD also get a solid box if you use the third mouse button
  612.    ' I haven't been able to test this, I don't have three buttons 
  613.    '
  614.    TMPL=CLPAL
  615.    If TMPL
  616.       CLPAL=False
  617.       CLPALETTE
  618.    End If 
  619.    Gr Writing 2
  620.    XB1=X Screen(X Mouse)
  621.    YB1=Y Screen(Y Mouse)
  622.    XB2=X Screen(X Mouse)
  623.    YB2=Y Screen(Y Mouse)
  624.    C=Colour(2)
  625.    Colour 2,$FFF
  626.    Ink 2
  627.    Box XB1,YB1 To XB2,YB2
  628.    Repeat 
  629.       OLDX2=XB2
  630.       OLDY2=YB2
  631.       XB2=X Screen(X Mouse)
  632.       YB2=Y Screen(Y Mouse)
  633.       Box XB1,YB1 To OLDX2,OLDY2
  634.       Box XB1,YB1 To XB2,YB2
  635.       B=Mouse Key
  636.       If Not(B=0)
  637.          BUT=B
  638.       End If 
  639.    Until B=0
  640.    Box XB1,YB1 To XB2,YB2
  641.    Gr Writing 1
  642.    Colour 2,C
  643.    Ink CURCOL
  644.    If XB1>XB2
  645.       Swap XB1,XB2
  646.    End If 
  647.    If YB1>YB2
  648.       Swap YB1,YB2
  649.    End If 
  650.    If BUT=1
  651.       Box XB1,YB1 To XB2,YB2
  652.    Else 
  653.       Bar XB1,YB1 To XB2,YB2
  654.    End If 
  655.    If TMPL
  656.       CLPAL=True
  657.       CLPALETTE
  658.    End If 
  659. End Proc
  660. Procedure CCIRCLE
  661.    '
  662.    ' Draws Circles
  663.    '
  664.    TMPL=CLPAL
  665.    If TMPL
  666.       CLPAL=False
  667.       CLPALETTE
  668.    End If 
  669.    Gr Writing 2
  670.    XB1=X Screen(X Mouse)
  671.    YB1=Y Screen(Y Mouse)
  672.    XB2=X Screen(X Mouse)
  673.    YB2=Y Screen(Y Mouse)
  674.    C=Colour(2)
  675.    Colour 2,$FFF
  676.    Ink 2
  677.    DIF2=(YB2-YB1)*(YB2-YB1)+(XB2-XB1)*(XB2-XB1)
  678.    DIF=Sqr(DIF2)
  679.    If DIF=0
  680.       DIF=1
  681.    End If 
  682.    Repeat 
  683.       OLDDIF=DIF
  684.       XB2=X Screen(X Mouse)
  685.       YB2=Y Screen(Y Mouse)
  686.       DIF=(YB2-YB1)*(YB2-YB1)+(XB2-XB1)*(XB2-XB1)
  687.       DIF=Sqr(DIF)
  688.       If DIF=0
  689.          DIF=1
  690.       End If 
  691.       If OLDDIF=DIF
  692.          Circle XB1,YB1,OLDDIF
  693.          Circle XB1,YB1,DIF
  694.       End If 
  695.       B=Mouse Key
  696.       If Not(B=0)
  697.          BUT=B
  698.       End If 
  699.    Until B=0
  700.    Gr Writing 1
  701.    Colour 2,C
  702.    Ink CURCOL
  703.    If DIF=0
  704.       Plot XB1,XB2
  705.    Else 
  706.       Circle XB1,YB1,DIF
  707.    End If 
  708.    If TMPL
  709.       CLPAL=True
  710.       CLPALETTE
  711.    End If 
  712. End Proc
  713. Procedure EELLIPSE
  714.    '
  715.    ' Draws Ellipses 
  716.    '
  717.    TMPL=CLPAL
  718.    If TMPL
  719.       CLPAL=False
  720.       CLPALETTE
  721.    End If 
  722.    BUT=Mouse Click : Rem ***** Clear Bits ***** 
  723.    Gr Writing 2
  724.    XB1=X Screen(X Mouse)
  725.    YB1=Y Screen(Y Mouse)
  726.    XB2=X Screen(X Mouse)
  727.    YB2=Y Screen(Y Mouse)
  728.    R1=Sqr((XB2-XB1)*(XB2-XB1))
  729.    R2=Sqr((YB2-YB1)*(YB2-YB1))
  730.    C=Colour(2)
  731.    Colour 2,$FFF
  732.    Ink 2
  733.    If R1=0
  734.       R1=1
  735.    End If 
  736.    If R2=0
  737.       R2=1
  738.    End If 
  739.    Ellipse XB1,YB1,R1,R2
  740.    Repeat 
  741.       OLDR1=R1
  742.       OLDR2=R2
  743.       XB2=X Screen(X Mouse)
  744.       YB2=Y Screen(Y Mouse)
  745.       R1=Sqr((XB2-XB1)*(XB2-XB1))
  746.       R2=Sqr((YB2-YB1)*(YB2-YB1))
  747.       If R1=0
  748.          R1=1
  749.       End If 
  750.       If R2=0
  751.          R2=1
  752.       End If 
  753.       If(R1=OLDR1) and(R2=OLDR2)
  754.       Else 
  755.          Ellipse XB1,YB1,OLDR1,OLDR2
  756.          Ellipse XB1,YB1,R1,R2
  757.       End If 
  758.       B=Mouse Key
  759.       If Not(B=0)
  760.          BUT=B
  761.       End If 
  762.    Until B=0
  763.    Gr Writing 1
  764.    Colour 2,C
  765.    Ink CURCOL
  766.    Ellipse XB1,YB1,R1,R2
  767.    If TMPL
  768.       CLPAL=True
  769.       CLPALETTE
  770.    End If 
  771. End Proc
  772. Procedure FFILL
  773.    '
  774.    ' Fills areas
  775.    '
  776.    TMPL=CLPAL
  777.    If TMPL
  778.       CLPAL=False
  779.       CLPALETTE
  780.    End If 
  781.    A=X Mouse : B=Y Mouse
  782.    A=X Screen(A) : B=Y Screen(B)
  783.    Ink CURCOL
  784.    Paint A,B,1
  785.    If TMPL
  786.       CLPAL=True
  787.       CLPALETTE
  788.    End If 
  789. End Proc
  790. Procedure SPRAY
  791.    '
  792.    ' Spraycan. IT and DPT are globals controlling the density and size of the   
  793.    ' spray. I may add a facility to alter these. If you use the right 
  794.    ' button (or the third if available - untested) then you get a star  
  795.    ' star spray. If I work out how to read the colour of a single pixel 
  796.    ' onscreen then I'll change the star spray into a mix. 
  797.    '
  798.    TMPL=CLPAL
  799.    If TMPL
  800.       CLPAL=False
  801.       CLPALETTE
  802.    End If 
  803.    Repeat 
  804.       Wait Vbl : X1=X Mouse : Y1=Y Mouse
  805.       X1=X Screen(X1) : Y1=Y Screen(Y1) : BU=Mouse Key
  806.       If BU>0
  807.          For I=1 To DPT
  808.             Ink CURCOL
  809.             A=Rnd(IT) : B=Rnd(360) : B#=B*Pi# : B#=B#/180
  810.             If BU=1
  811.                Plot X1+A*Cos(B#),Y1+A*Sin(B#)
  812.             Else 
  813.                CL1=Point(X1-A*Cos(B#),Y1-A*Sin(B#)) : CL2=Point(X1+A*Cos(B#),Y1+A*Sin(B#))
  814.                If(CL1*CL2)>0.0
  815.                   Plot X1+A*Cos(B#),Y1+A*Sin(B#),CL1
  816.                   Plot X1-A*Cos(B#),Y1-A*Sin(B#),CL2
  817.                End If 
  818.                'Draw X1,Y1 To X1+A*Cos(B#),Y1+A*Sin(B#) 
  819.             End If 
  820.          Next I
  821.       End If 
  822.    Until BU=0
  823.    If TMPL
  824.       CLPAL=True
  825.       CLPALETTE
  826.    End If 
  827. End Proc
  828. Procedure LINE
  829.    '
  830.    ' Draws Straight lines 
  831.    ' If you tap the right button whilst preparing your line, (or use your 
  832.    ' third button from the off- again untested) you get a fan effect. 
  833.    ' This is active when the left button is pressed, inactive when it isn't 
  834.    ' Because FAN is an extended operation and it is very easy to draw on  
  835.    ' the colourbox using this operation only to find the screen unaffected  
  836.    ' The colourbox can be switched on and off in FAN mode using the C key.
  837.    ' Colours can be changed by clicking on the appropriate colour in the
  838.    ' Colourbox with THE RIGHT MOUSEBUTTON. This is a major anomaly with 
  839.    ' the rest of AmPP, but isn't too much hassle. 
  840.    '
  841.    TEMP=CLPAL
  842.    Gr Writing 2
  843.    XB1=X Screen(X Mouse)
  844.    YB1=Y Screen(Y Mouse)
  845.    XB2=X Screen(X Mouse)
  846.    YB2=Y Screen(Y Mouse)
  847.    C=Colour(2)
  848.    Colour 2,$FFF
  849.    Ink 2
  850.    Draw XB1,YB1 To XB2,YB2
  851.    Repeat 
  852.       OLDX2=XB2
  853.       OLDY2=YB2
  854.       XB2=X Screen(X Mouse)
  855.       YB2=Y Screen(Y Mouse)
  856.       Draw XB1,YB1 To OLDX2,OLDY2
  857.       Draw XB1,YB1 To XB2,YB2
  858.       B=Mouse Key
  859.       If B>1
  860.          Draw XB1,YB1 To XB2,YB2
  861.          Repeat 
  862.          Until Mouse Key<2
  863.          TEST=False
  864.          Repeat 
  865.             OLDX2=XB2
  866.             OLDY2=YB2
  867.             XB2=X Mouse : YB2=Y Mouse
  868.             XB2=X Screen(XB2) : YB2=Y Screen(YB2)
  869.             B=Mouse Key
  870.             If B=1
  871.                If PALON
  872.                   CLPAL=False
  873.                   CLPALETTE
  874.                   PALON=CLPAL
  875.                End If 
  876.             Else 
  877.                If Not PALON
  878.                   CLPAL=TEMP
  879.                   If CLPAL
  880.                      CLPALETTE
  881.                      PALON=CLPAL
  882.                   End If 
  883.                End If 
  884.             End If 
  885.             If Upper$(Inkey$)="C"
  886.                CLPAL= Not CLPAL
  887.                TEMP=CLPAL
  888.                CLPALETTE
  889.             End If 
  890.             If B>1
  891.                Z=Mouse Zone
  892.                FINI=(Z=0)
  893.                If Not FINI
  894.                   If Z>17
  895.                      If OPEN
  896.                         CURCOL=Z-18
  897.                         Screen 0
  898.                         Ink CURCOL
  899.                         Bar 81,1 To 87,79
  900.                      End If 
  901.                   End If 
  902.                End If 
  903.             End If 
  904.             If B=0
  905.                Gr Writing 2
  906.                If TEST
  907.                   Draw XB1,YB1 To OLDX2,OLDY2
  908.                End If 
  909.                Draw XB1,YB1 To XB2,YB2
  910.                TEST=True
  911.                Gr Writing 1
  912.             Else 
  913.                If TEST
  914.                   Gr Writing 2
  915.                   Draw XB1,YB1 To OLDX2,OLDY2
  916.                End If 
  917.                TEST=False
  918.                Gr Writing 1
  919.                Ink CURCOL
  920.                If Z<18
  921.                   Draw XB1,YB1 To XB2,YB2
  922.                Else 
  923.                   Z=0
  924.                End If 
  925.             End If 
  926.          Until FINI
  927.          B=0
  928.       End If 
  929.    Until B=0
  930.    Gr Writing 1
  931.    Colour 2,C
  932.    Ink CURCOL
  933.    Draw XB1,YB1 To XB2,YB2
  934.    CLPAL=TEMP
  935.    CLPALETTE
  936. End Proc
  937. Procedure CUT
  938.    '
  939.    ' Cuts out BOBS for use with PPaste  
  940.    '
  941.    If INBOB
  942.       Bob Update Off 
  943.       Bob Clear 
  944.    End If 
  945.    Gr Writing 2
  946.    XB1=X Screen(X Mouse)
  947.    YB1=Y Screen(Y Mouse)
  948.    XB2=X Screen(X Mouse)
  949.    YB2=Y Screen(Y Mouse)
  950.    C=Colour(2)
  951.    Colour 2,$FFF
  952.    Ink 2
  953.    Box XB1,YB1 To XB2,YB2
  954.    Repeat 
  955.       OLDX2=XB2
  956.       OLDY2=YB2
  957.       XB2=X Screen(X Mouse)
  958.       YB2=Y Screen(Y Mouse)
  959.       Box XB1,YB1 To OLDX2,OLDY2
  960.       Box XB1,YB1 To XB2,YB2
  961.       B=Mouse Key
  962.       If Not(B=0)
  963.          BUT=B
  964.       End If 
  965.    Until B=0
  966.    Box XB1,YB1 To XB2,YB2
  967.    Plot XB1,YB1 : Rem **** Stops a dot in top left of cut
  968.    Gr Writing 1
  969.    Colour 2,C
  970.    Ink CURCOL
  971.    If XB1>XB2
  972.       Swap XB1,XB2
  973.    End If 
  974.    If YB1>YB2
  975.       Swap YB1,YB2
  976.    End If 
  977.    Get Bob 1,XB1,YB1 To XB2+1,YB2+1
  978.    INBOB=True
  979.    ST_AMAL=True
  980.    AMLON=False
  981.    Hot Spot 1,17
  982. End Proc
  983. Procedure PPASTE
  984.    '
  985.    ' Pastes the bobs. 
  986.    ' I did have a really good AMAL program to make the BOB follow the mouse 
  987.    ' when in PASTE mode. but due to the screen saving I got wierd effects 
  988.    ' Pasting the BOBS. The solution is to turn off the AMAL program, and
  989.    ' then paste the BOB and turn it back on. Who knows? By the time 
  990.    ' you read this I might have done it. If I do, I'll leave this message.
  991.    ' what am I saying? If I delete this message you'll be none the wiser! 
  992.    '
  993.    ' I decided to leave the message!!! (as a word to the wise)  
  994.    TMPL=CLPAL
  995.    If TMPL
  996.       CLPAL=False
  997.       CLPALETTE
  998.    End If 
  999.    If INBOB
  1000.       Repeat 
  1001.          Put Bob 1
  1002.       Until Mouse Key=0
  1003.    Else 
  1004.       Bell 10
  1005.    End If 
  1006.    AMLON=True
  1007.    If TMPL
  1008.       CLPAL=True
  1009.       CLPALETTE
  1010.    End If 
  1011. End Proc
  1012. Procedure ZOOOM
  1013.    Bell 10
  1014.    ' Not implemeted in pre-release. In time I want to do a fully
  1015.    ' featured zoom function. But, hey, it's only taken me a week to get 
  1016.    ' This far. It's only two and a half weeks since I started programming 
  1017.    ' AMOS in earnest. The Zoom might take a little longer to appear as
  1018.    ' my freetime is about to vanish!. 
  1019.    '  
  1020.    ' I got AMOS at the last Computer shopper show in the winter, for about
  1021.    ' 25 Pounds. Sure I'd tinkered with it, entered a few listings but never 
  1022.    ' got that far, as my A-Levels were looming ever nearer etc. But now 
  1023.    ' they're over, I'm going to Uni in October, and I couldn't get a  
  1024.    ' temporary job for the summer ( who says the recessions over? ).
  1025.    ' So I sat down a couple of weeks ago, and it's easier than I thought, 
  1026.    ' not sitting down stupid, AMOS. Okay, I can't do without the manual,
  1027.    ' buts that's because each command has more parameters than Gorbachev has
  1028.    ' supporters. (topical, eh? He got his Job back TODAY, 22rd Aug 1991)  
  1029.    ' But I've got a job coming up soon, and that's why I've left this 
  1030.    ' open-ended with a pre-release. Sorry.  
  1031.    '
  1032. End Proc
  1033. Procedure TTEXT
  1034.    '
  1035.    ' See Zooom
  1036.    '
  1037.    ' It's not that this procedure would be too time consuming It's just that
  1038.    ' I can't think of a nice way to do it. Y'see, I can't add another menu
  1039.    ' for Fonts as this would take me of the edge of a lowres screen, and
  1040.    ' text can't be entered directly on the screen as I have no UNDO.
  1041.    ' I need a window or something to edit the text FIRST. 
  1042.    ' Basically, I can't be bothered, but the main prob is choosing the fonts. 
  1043.    ' Anyway, what are you complaining about, No Text? Stop wibbling, you've 
  1044.    ' got a Painting Oackage you didn't have yesterday, and how much did 
  1045.    ' it cost you? Next to nothing, I'll bet. Oh yeah, and a postage stamp.
  1046.    ' Postage stamp? Yup, to send that PD disk to me, (see diskware), I  
  1047.    ' didn't count the disk price in the cost as you get it back, with some
  1048.    ' other stuff on it!!!  Oh, you only get it back if I get your address 
  1049.    ' as well. Mine is 107 Heron Rd. Larkfield, Kent, England. See top of file 
  1050.    '
  1051. End Proc
  1052. Procedure ACTION
  1053.    '
  1054.    ' Process menus
  1055.    ' FXIT is used in a Bug fix of AMOS 1.2, I must tell Mandarin about that 
  1056.    ' and the suspected bug when Input is used with a real variable. 
  1057.    ' Amos_Brot V1.0 uses input, and it crashes periodically, the program  
  1058.    ' does not seem to move on from the input call. (all that follows it is
  1059.    ' another input!)
  1060.    '
  1061.    BUT=0
  1062.    If Choice or FXIT
  1063.       FXIT=False
  1064.       TEMP=TTOOLS
  1065.       TTOOLS=False
  1066.       TTOOLBOX
  1067.       TTOOLS=TEMP
  1068.       If Choice(1)=1
  1069.          If Choice(2)=1
  1070.             REQ["Clear Screen?","Yes","No"]
  1071.             If Left$(Param$,1)="Y"
  1072.                Screen 0
  1073.                TEMP=CLPAL
  1074.                CLPAL=False
  1075.                CLPALETTE
  1076.                CLPAL=TEMP
  1077.                If AMLON
  1078.                   Bob Update Off 
  1079.                   Bob Clear 
  1080.                End If 
  1081.                Cls 0
  1082.                If AMLON
  1083.                   Bob Draw 
  1084.                   Bob Update On 
  1085.                End If 
  1086.                CLPALETTE
  1087.             End If 
  1088.          End If 
  1089.          If Choice(2)=3
  1090.             LPIC
  1091.          End If 
  1092.          If Choice(2)=4
  1093.             SPIC
  1094.          End If 
  1095.          If Choice(2)=6
  1096.             SCRMODE
  1097.          End If 
  1098.          If Choice(2)=7
  1099.             PAL
  1100.          End If 
  1101.          If Choice(2)=8
  1102.             TTOOLS= Not TTOOLS
  1103.          End If 
  1104.          If Choice(2)=9
  1105.             CLPAL= Not CLPAL
  1106.          End If 
  1107.          If Choice(2)=10
  1108.             ABOUT
  1109.          End If 
  1110.          If Choice(2)=11
  1111.             BON= Not BON
  1112.          End If 
  1113.          If Choice(2)=13
  1114.             REQ["Positive?","Yes","No"]
  1115.             If Left$(Param$,1)="Y"
  1116.                FIN=True
  1117.             End If 
  1118.          End If 
  1119.       Else 
  1120.          If Choice(1)=2
  1121.             If Choice(2)=1
  1122.                CURROP=1
  1123.             End If 
  1124.             If Choice(2)=2
  1125.                CURROP=7
  1126.             End If 
  1127.             If Choice(2)=3
  1128.                CURROP=2
  1129.             End If 
  1130.             If Choice(2)=4
  1131.                CURROP=8
  1132.             End If 
  1133.             If Choice(2)=5
  1134.                CURROP=3
  1135.             End If 
  1136.             If Choice(2)=6
  1137.                CURROP=9
  1138.             End If 
  1139.             If Choice(2)=7
  1140.                CURROP=4
  1141.             End If 
  1142.             If Choice(2)=8
  1143.                CURROP=10
  1144.             End If 
  1145.             If Choice(2)=9
  1146.                CURROP=5
  1147.             End If 
  1148.             If Choice(2)=10
  1149.                CURROP=11
  1150.             End If 
  1151.             If Choice(2)=11
  1152.                CURROP=6
  1153.             End If 
  1154.             If Choice(2)=12
  1155.                CURROP=12
  1156.             End If 
  1157.             If Choice(2)=14
  1158.                MSTORE=1
  1159.             End If 
  1160.             If Choice(2)=15
  1161.                MSTORE=2
  1162.             End If 
  1163.             If Choice(2)=17
  1164.                CHNGVARY[50]
  1165.                IT=Param
  1166.             End If 
  1167.             If Choice(2)=18
  1168.                CHNGVARY[50]
  1169.                DPT=Param
  1170.             End If 
  1171.             Change Mouse MSTORE
  1172.          End If 
  1173.       End If 
  1174.       Screen 0
  1175.       TTOOLBOX
  1176.    End If 
  1177.    DEFMENU
  1178.    Clear Key 
  1179.    On Menu On 
  1180. End Proc
  1181. Procedure ABOUT
  1182.    '
  1183.    ' Show my details to all those who haven't got AMOS to read these REMS 
  1184.    ' Updaters may add there own credit screens if my credit screen comes
  1185.    ' up first and unaltered. If you update the prog send your RAMOS disk
  1186.    ' to me, you'll get it back, with info on your version number ( we don't 
  1187.    ' want different programs knocking around with identical version numbers!) 
  1188.    ' I'll use a letter system, a big renovation might go from 1.0 to 1.1  
  1189.    ' or 1.0f say, a smaller revision might get less of a leap due to being  
  1190.    ' slotted between other updates. 
  1191.    '
  1192.    ' Anyone sending a disk under Diskware will receive the latest/best  
  1193.    ' revision (or both) if available. 
  1194.    '
  1195.    Boom 
  1196.    Hide 
  1197.    TEMP=TTOOLS
  1198.    TTOOLS=False
  1199.    TTOOLBOX
  1200.    TTOOLS=TEMP
  1201.    Menu Off 
  1202.    Clear Key 
  1203.    If ABOT or Exist("Sources:Graphics/About.ABK")
  1204.       If Not ABOT
  1205.          Load "Sources:Graphics/About.abk",10
  1206.          ABOT=True
  1207.       End If 
  1208.       Unpack 10 To 5
  1209.       'Screen Open 1,160,187,16,Lowres 
  1210.       'screen Display 1,220,60,,'
  1211.       Repeat 
  1212.          FINI=(Mouse Key=1)
  1213.          K$=Inkey$
  1214.          If Not(K$="")
  1215.             FINI=True
  1216.          End If 
  1217.       Until FINI
  1218.       Screen Close 5
  1219.    Else 
  1220.    End If 
  1221.    Show 
  1222.    Clear Key 
  1223.    Menu On 
  1224.    TTOOLBOX
  1225. End Proc
  1226. Procedure LPIC
  1227.    '
  1228.    ' Loads a picture
  1229.    '
  1230.    T=REQON
  1231.    AML=AMLON
  1232.    AMLON=False
  1233.    If AML
  1234.       Amal Freeze 
  1235.       Bob Clear 
  1236.       Amal Off 
  1237.    End If 
  1238.    TMP=CLPAL : CLPAL=False : CLPALETTE
  1239.    TEMP=TTOOLS : TTOOLS=False : TTOOLBOX : TTOOLS=TEMP : CLPAL=TMP
  1240.    F$=Fsel$("**.**","","(AM)os (P)ainting (P)ackage "," Load a Picture")
  1241.    If Not F$=""
  1242.       If Upper$(Right$(F$,3))="PCK"
  1243.          Load F$,9
  1244.          Unpack 9 To 0
  1245.       Else 
  1246.          Load Iff F$,0
  1247.       End If 
  1248.       If Screen Colour<65
  1249.          If Screen Width mod 320=0
  1250.             If(Screen Height=200) or(Screen Height=256)
  1251.                HEIGHT=Screen Height
  1252.                PAL=(HEIGHT=256)
  1253.                WIDTH=Screen Width
  1254.                CLR=Screen Colour
  1255.             Else 
  1256.                REQ["Screen size is iffy","Oh","Bugger!"]
  1257.                REQON=False
  1258.                SCRMODE
  1259.             End If 
  1260.          Else 
  1261.             Cls 0
  1262.             REQ["Screen size is iffy","Oh","Bugger!"]
  1263.             REQON=False
  1264.             SCRMODE
  1265.          End If 
  1266.       Else 
  1267.          REQ["HAM not supported","Oh","No!"]
  1268.          REQON=False
  1269.          SCRMODE
  1270.          Cls 0
  1271.       End If 
  1272.    End If 
  1273.    REQON=T
  1274.    TTOOLBOX
  1275.    If AML
  1276.       Bob 1,X Screen(X Mouse),Y Screen(Y Mouse),1
  1277.       Channel 1 To Bob 1
  1278.       G$="AU (I R0<>XS(0,XM) J U I R1<>YS(0,YM) J U X U:"
  1279.       G$=G$+"L R0=XS(0,XM);"
  1280.       G$=G$+"L R1=YS(0,YM); D M) M: M R0-X,R1-Y,1 W;"
  1281.       Amal 1,G$
  1282.       Amal On 
  1283.    End If 
  1284.    AMLON=AML
  1285. End Proc
  1286. Procedure SPIC
  1287.    '
  1288.    ' Saves a picture
  1289.    '
  1290.    If AMLON
  1291.       Amal Freeze 
  1292.       Bob Clear 
  1293.       Amal Off 
  1294.    End If 
  1295.    TMP=CLPAL : CLPAL=False : CLPALETTE
  1296.    TEMP=TTOOLS : TTOOLS=False : TTOOLBOX : TTOOLS=TEMP : CLPAL=TMP
  1297.    F$=Fsel$("**.**","","(AM)os (P)ainting (P)ackage "," Load a Picture")
  1298.    If Not F$=""
  1299.       STAN=(Upper$(Right$(F$,3))="IFF")
  1300.       PCK=(Upper$(Right$(F$,3))="PCK")
  1301.       If Not(STAN or PCK)
  1302.          REQ["File Format?","Iff","Pck"]
  1303.          If Upper$(Left$(Param$,1))="I"
  1304.             F$=F$+".IFF"
  1305.             STAN=True
  1306.          Else 
  1307.             F$=F$+".PCK"
  1308.             PCK=True
  1309.          End If 
  1310.       End If 
  1311.       If PCK
  1312.          REQ["Hold on a mo","Okay","Matey"]
  1313.          Hide 
  1314.          Spack 0 To 9
  1315.          Save F$,9
  1316.          Show 
  1317.       Else 
  1318.          REQ["Iff Compression?","Yup","No thanks."]
  1319.          If Upper$(Left$(Param$,1))="Y"
  1320.             COMP=1
  1321.          Else 
  1322.             COMP=0
  1323.          End If 
  1324.          Save Iff F$,COMP
  1325.       End If 
  1326.    End If 
  1327.    If AMLON
  1328.       Bob 1,X Screen(X Mouse),Y Screen(Y Mouse),1
  1329.       Channel 1 To Bob 1
  1330.       G$="AU (I R0<>XS(0,XM) J U I R1<>YS(0,YM) J U X U:"
  1331.       G$=G$+"L R0=XS(0,XM);"
  1332.       G$=G$+"L R1=YS(0,YM); D M) M: M R0-X,R1-Y,1 W;"
  1333.       Amal 1,G$
  1334.       Amal On 
  1335.    End If 
  1336.    TTOOLBOX
  1337. End Proc
  1338. Procedure SCRMODE
  1339.    '  
  1340.    ' Changes the screen MOde. C'mon Mandarin, where's interlace?
  1341.    '
  1342.    Clear Key 
  1343.    Menu Off 
  1344.    REQ["Change Screen?","Yes","No"]
  1345.    If Left$(Param$,1)="Y"
  1346.       Change Mouse 1
  1347.       Limit Mouse 
  1348.       If HEIGHT=256
  1349.          PAL=True
  1350.       End If 
  1351.       ZNNUM=11
  1352.       INBOB=False
  1353.       WDT=320
  1354.       HTH=150
  1355.       WDT=WDT
  1356.       HTH=HTH
  1357.       FINISHED=False
  1358.       Screen Open 1,WDT+16,HTH+8,2,Lowres
  1359.       Flash Off 
  1360.       Curs Off 
  1361.       Palette $0,$DDD
  1362.       Cls 1
  1363.       Paper 1
  1364.       Pen 0
  1365.       Reserve Zone ZNNUM
  1366.       If PAL
  1367.          RES$="256"
  1368.       Else 
  1369.          RES$="200"
  1370.       End If 
  1371.       PAL$=Border$(Zone$("Pal.",1),1)
  1372.       NTSC$=Border$(Zone$("Ntsc.",2),1)
  1373.       LOW$=Border$(Zone$("320x"+RES$,3),1)
  1374.       HI$=Border$(Zone$("640x"+RES$,4),1)
  1375.       TWO$=Border$(Zone$(" 2 ",5),1)
  1376.       FUR$=Border$(Zone$(" 4 ",6),1)
  1377.       AYT$=Border$(Zone$(" 8 ",7),1)
  1378.       SXT$=Border$(Zone$("16 ",8),1)
  1379.       TRT$=Border$(Zone$("32 ",9),1)
  1380.       SXF$=Border$(Zone$("EHB",10),1)
  1381.       FIN$=Border$(Zone$("Okay.",11),1)
  1382.       L=11 : G=6 : T=3 : S=3
  1383.       Locate L,T : Print PAL$
  1384.       Locate L+6,T : Print NTSC$
  1385.       Locate L,T+2*S : Print LOW$
  1386.       Locate L,T+3*S : Print HI$
  1387.       Locate L+14,T : Print TWO$
  1388.       Locate L+14+G,T : Print SXT$
  1389.       Locate L+14,T+S : Print FUR$
  1390.       Locate L+14+G,T+S : Print TRT$
  1391.       Locate L+14,T+2*S : Print AYT$
  1392.       Locate L+14+G,T+2*S : Print SXF$
  1393.       Locate L+15,T+3*S : Print FIN$
  1394.       Locate L,T+4*S
  1395.       Print Str$(WIDTH)+"x"+RES$+"  "+Str$(CLR)+" colours. ";
  1396.       Repeat 
  1397.          K$=Inkey$
  1398.          If Mouse Key=1
  1399.             Locate L,T+4*S
  1400.             Print Str$(WIDTH)+"x"+RES$+"  "+Str$(CLR)+" colours. "
  1401.             Z=Mouse Zone
  1402.             If Z>0
  1403.                If Z<ZNNUM+1
  1404.                   If Z<3
  1405.                      If Z=1
  1406.                         PAL=True
  1407.                      Else 
  1408.                         PAL=False
  1409.                      End If 
  1410.                      If PAL
  1411.                         RES$="256"
  1412.                      Else 
  1413.                         RES$="200"
  1414.                      End If 
  1415.                      LOW$=Border$(Zone$("320x"+RES$,3),1)
  1416.                      HI$=Border$(Zone$("640x"+RES$,4),1)
  1417.                      Locate L+X,T+2*S : Print LOW$
  1418.                      Locate L+X,T+3*S : Print HI$
  1419.                   End If 
  1420.                   If Z=3
  1421.                      WIDTH=320
  1422.                   End If 
  1423.                   If Z=4
  1424.                      WIDTH=640
  1425.                      If CLR>16
  1426.                         CLR=16
  1427.                      End If 
  1428.                   End If 
  1429.                   If(Z>4) and(Z<11)
  1430.                      I=Z-4
  1431.                      CLR=1
  1432.                      For P=1 To I
  1433.                         CLR=2*CLR
  1434.                      Next P
  1435.                      If CLR>16
  1436.                         WIDTH=320
  1437.                      End If 
  1438.                   End If 
  1439.                   If Z=11
  1440.                      FINISHED=True
  1441.                   End If 
  1442.                End If 
  1443.             End If 
  1444.          End If 
  1445.          If Not K$=""
  1446.             FINISHED=True
  1447.          End If 
  1448.       Until FINISHED
  1449.       Reserve Zone 
  1450.       Screen Close 1
  1451.       If PAL
  1452.          HEIGHT=256
  1453.       Else 
  1454.          HEIGHT=200
  1455.       End If 
  1456.       If WIDTH=320
  1457.          Screen Open 0,WIDTH,HEIGHT,CLR,Lowres
  1458.       Else 
  1459.          Screen Open 0,WIDTH,HEIGHT,CLR,Hires
  1460.       End If 
  1461.       Curs Off 
  1462.       Flash Off 
  1463.       Cls 0
  1464.       DEFPAL
  1465.    End If 
  1466.    Menu On 
  1467.    Change Mouse MSTORE
  1468.    Screen To Back 0
  1469.    Limit Mouse 128,42 To 127+WIDTH,41+HEIGHT
  1470. End Proc
  1471. Procedure REQ[MS$,V1$,V2$]
  1472.    Clear Key 
  1473.    Rem *************************************
  1474.    Rem **      REQUEST BOX CONTROLLER     **  
  1475.    Rem *************************************
  1476.    Rem **   PLEASE MAKE V1$ YOUR DEFAULT  **
  1477.    Rem **   This will be returned if the  **
  1478.    Rem **      boxes are turned off,      **
  1479.    Rem **   MS$ is the box message, the   **          
  1480.    Rem **         two are gadgets         **
  1481.    Rem *************************************
  1482.    If REQON
  1483.       If AMLON
  1484.          Amal Freeze 
  1485.          Bob Clear 
  1486.          Amal Off 
  1487.       End If 
  1488.       REQBOX[MS$,V1$,V2$]
  1489.       If AMLON
  1490.          Bob 1,X Screen(X Mouse),Y Screen(Y Mouse),1
  1491.          Channel 1 To Bob 1
  1492.          G$="AU (I R0<>XS(0,XM) J U I R1<>YS(0,YM) J U X U:"
  1493.          G$=G$+"L R0=XS(0,XM);"
  1494.          G$=G$+"L R1=YS(0,YM); D M) M: M R0-X,R1-Y,1 W;"
  1495.          Amal 1,G$
  1496.          Amal On 
  1497.       End If 
  1498.       V$=Param$
  1499.    Else 
  1500.       V$=V1$
  1501.    End If 
  1502.    Clear Key 
  1503. End Proc[V$]
  1504. Procedure REQBOX[MES$,G1$,G2$]
  1505.    '  
  1506.    ' Actual request Box 
  1507.    '
  1508.    Rem ******************** 
  1509.    Rem ** Use my Colours ** 
  1510.    Rem ******************** 
  1511.    C1=Colour(1)
  1512.    C2=Colour(2)
  1513.    Colour 1,$A40
  1514.    Colour 2,$FFF
  1515.    If CLR>2
  1516.       Pen 2
  1517.       Paper 1
  1518.    Else 
  1519.       Pen 1
  1520.       Paper 0
  1521.    End If 
  1522.    Rem *********************************
  1523.    Rem ***    Do that Request Box    ***
  1524.    Rem *********************************
  1525.    Change Mouse 1
  1526.    A$=Left$(G1$,1) : Rem **** Work out first letters **** 
  1527.    B$=Left$(G2$,1) : Rem **** in gadgets ***
  1528.    If Asc(A$)>96 Then A$=Chr$(Asc(A$)-32) : Rem ***Convert case ***
  1529.    If Asc(B$)>96 Then B$=Chr$(Asc(B$)-32) : Rem *** myself *** 
  1530.    I=Len(MES$)+6 : Rem *** Work out title length ***
  1531.    If I<(Len(G1$+G2$)+9) Then I=(Len(G1$+G2$)+9) : Rem ** see if it's **
  1532.    Rem ******* Longer than the gadget lengths ******
  1533.    J=I*8 : Rem Hash together a block save 
  1534.    K=J/16
  1535.    If Not(J=K*16)
  1536.       J=J+8
  1537.    End If 
  1538.    J=J+16 : Rem to be sure of size 
  1539.    Rem *********************************************************
  1540.    Rem ** I used the blocks as they are quicker than windsave **
  1541.    Rem ** I know on page 101 it says to create a Dummy window **
  1542.    Rem ** But how? and if you could open the dummy window,    **
  1543.    Rem ** without affecting the screen why didn't it do that  **
  1544.    Rem **                     anyway?                         **
  1545.    Rem *********************************************************
  1546.    Get Block 1,0,0,J,80
  1547.    Wind Open 1,0,0,I,8,1 : Rem ***Save background open box ***
  1548.    Curs Off 
  1549.    Flash Off 
  1550.    Reserve Zone 2 : Rem ****reserve two Zones***** 
  1551.    Window 1
  1552.    Title Top MES$ : Rem ****Put in the box title***
  1553.    Locate 2,3
  1554.    Print Border$(Zone$(G1$,1),1) : Rem **** Add the gadgets *** 
  1555.    T=I-Len(G2$)-4 : Rem *** Find posn of right gadget ***
  1556.    Locate T,3
  1557.    Print Border$(Zone$(G2$,2),1)
  1558.    Repeat : Rem ***Wait for a response or a keypress ****
  1559.       I=Mouse Key : Rem *** Keypress only works if first letters *** 
  1560.       OK=((I=1) or(I=3)) : Rem *** are different ***
  1561.       A=Mouse Zone
  1562.       INZ=((1=A) or(2=A))
  1563.       If Not(A$=B$)
  1564.          X$=Inkey$
  1565.          If Asc(X$)>96
  1566.             X$=Chr$(Asc(X$)-32)
  1567.          End If 
  1568.          LETT=((X$=A$) or(X$=B$))
  1569.          If LETT
  1570.             If X$=A$
  1571.                A=1
  1572.             Else 
  1573.                A=2
  1574.             End If 
  1575.          End If 
  1576.       End If 
  1577.    Until LETT or(OK and INZ)
  1578.    Wind Close 
  1579.    Rem *************************
  1580.    Rem ** Put Background Back **
  1581.    Rem *************************
  1582.    Put Block 1
  1583.    Del Block 1
  1584.    Reset Zone 1
  1585.    Reset Zone 2
  1586.    If A=1
  1587.       A$=G1$
  1588.    Else 
  1589.       A$=G2$
  1590.    End If 
  1591.    Colour 1,C1
  1592.    Colour 2,C2
  1593.    Change Mouse MSTORE
  1594.    Rem ***** Return the selected variable ***** 
  1595. End Proc[A$]
  1596. Procedure PAL
  1597.    '
  1598.    ' Do Palette, procedure has been changed by neccesity since AMOS_BROT
  1599.    ' But you wouldn't know it would you?
  1600.    '
  1601.    Rem ************************************************** 
  1602.    Rem ** I worked out how to do this all on my own   *** 
  1603.    Rem ** I'm quite proud of it, even if it is clumsy ***   
  1604.    Rem ************************************************** 
  1605.    Rem ** This version is uodated to that found in    *** 
  1606.    Rem ** Amos Brot in that it now operates up to 64  *** 
  1607.    Rem ** Colours *************************************** 
  1608.    Rem ************************************************** 
  1609.    TEMP=CLPAL
  1610.    CLPAL=False
  1611.    CLPALETTE
  1612.    CLPAL=True
  1613.    Clear Key 
  1614.    Volume 10
  1615.    Change Mouse 1
  1616.    Menu Off 
  1617.    STX=0
  1618.    STY=0
  1619.    WDT=304
  1620.    HTH=104
  1621.    Get Cblock 1,0,0,WDT+16,HTH+8
  1622.    Curs Off 
  1623.    Reserve Zone CLR+8
  1624.    Repeat 
  1625.       K$=Inkey$
  1626.       FINISHED=False
  1627.       CHNGPAL=False
  1628.       Flash Off 
  1629.       Curs Off 
  1630.       Ink PALFOR
  1631.       Set Pattern 0
  1632.       Box STX,STY To STX+WDT,STY+HTH
  1633.       Ink PALBAK
  1634.       Bar STX+1,STY+1 To STX+WDT-1,STY+HTH-1
  1635.       Ink PALFOR
  1636.       GP=8
  1637.       DIFX=WDT/2-GP*2
  1638.       DIFY=HTH/2-GP/2
  1639.       DIFX=DIFX-(DIFX mod 8) : Rem ** to ensure even boxes ** 
  1640.       DIFY=DIFY-(DIFY mod 4)
  1641.       XSTART=WDT/2+GP+STX
  1642.       YSTART=STY+GP/2
  1643.       Box XSTART,YSTART To XSTART+DIFX,YSTART+DIFY
  1644.       If CLR=2
  1645.          HLINE=2
  1646.          VLINE=3
  1647.       Else 
  1648.          If CLR<16
  1649.             HLINE=3
  1650.             If CLR=4
  1651.                VLINE=3
  1652.             Else 
  1653.                VLINE=5
  1654.             End If 
  1655.          Else 
  1656.             HLINE=5
  1657.             If CLR=16
  1658.                VLINE=5
  1659.             Else 
  1660.                If CLR=32
  1661.                   VLINE=9
  1662.                Else 
  1663.                   VLINE=17
  1664.                End If 
  1665.             End If 
  1666.          End If 
  1667.       End If 
  1668.       HDIV=HLINE-1
  1669.       VDIV=VLINE-1
  1670.       For I=0 To HDIV
  1671.          Draw XSTART,YSTART+I*(DIFY/HDIV) To XSTART+DIFX,YSTART+I*(DIFY/HDIV)
  1672.       Next I
  1673.       For I=0 To VDIV
  1674.          Draw XSTART+I*(DIFX/VDIV),YSTART To XSTART+I*(DIFX/VDIV),YSTART+DIFY
  1675.       Next I
  1676.       For I=0 To CLR-1
  1677.          XP=XSTART+1+(I mod VDIV)*(DIFX/VDIV)
  1678.          YP=YSTART+1+(I/VDIV)*(DIFY/HDIV)
  1679.          Ink I
  1680.          XP2=XP+(DIFX/VDIV)-2
  1681.          YP2=YP+(DIFY/HDIV)-2
  1682.          Bar XP,YP To XP2,YP2
  1683.          Set Zone I+1,XP,YP To XP2,YP2
  1684.       Next I
  1685.       X1=STX+WDT-DIFX/3-GP
  1686.       Y1=YSTART+DIFY+2
  1687.       X2=XSTART+DIFX
  1688.       Y2=STY+HTH-3
  1689.       Ink PALFOR
  1690.       Box X1,Y1 To X2,Y2
  1691.       Ink CURCOL
  1692.       Bar(X1+1),(Y1+1) To(X2-1),(Y2-1)
  1693.       Pen PALFOR
  1694.       Locate X Text(XSTART),Y Text(YSTART+GP+DIFY)
  1695.       Paper PALBAK
  1696.       Print Border$(Zone$("Swap",CLR+1),1);Cright$;Cright$;Border$(Zone$("Use",CLR+2),1)
  1697.       Locate X Text(STX+2*GP),Y Text(YSTART+4*GP+DIFY)
  1698.       FO$=Border$(Zone$("Foreground",CLR+3),1)
  1699.       BA$=Border$(Zone$("Background",CLR+4),1)
  1700.       RE$=Border$(Zone$("Reset",CLR+5),1)
  1701.       Print FO$;Cright$;Cright$;BA$;Cright$;Cright$;RE$
  1702.       C=Colour(CURCOL)
  1703.       BLUE=C mod 16
  1704.       GREEN=(C/16) mod 16
  1705.       RED=(C/256) mod 16
  1706.       T1=STY+GP
  1707.       GAP=30
  1708.       STGP=20
  1709.       Set Zone CLR+6,STX+STGP,T1 To STX+STGP+GAP,YSTART+2*GP+DIFY
  1710.       Set Zone CLR+7,STX+STGP+GAP+GP,T1 To STX+STGP+GP+2*GAP,YSTART+2*GP+DIFY
  1711.       Set Zone CLR+8,STX+STGP+2*GAP+2*GP,T1 To STX+STGP+2*GP+3*GAP,YSTART+2*GP+DIFY
  1712.       VSLIDE[STX+STGP,T1,STX+STGP+GAP,YSTART+2*GP+DIFY,RED]
  1713.       VSLIDE[STX+STGP+GAP+GP,T1,STX+STGP+GP+2*GAP,YSTART+2*GP+DIFY,GREEN]
  1714.       VSLIDE[STX+STGP+2*GAP+2*GP,T1,STX+STGP+2*GP+3*GAP,YSTART+2*GP+DIFY,BLUE]
  1715.       Repeat 
  1716.          FINISHED=False
  1717.          CHNGPAL=False
  1718.          Z=Mouse Zone
  1719.          K=Mouse Key
  1720.          If K=1
  1721.             If(Z<CLR+1) and(Z>0)
  1722.                Set Pattern 0
  1723.                CURCOL=Z-1
  1724.                C=Colour(CURCOL)
  1725.                Ink CURCOL
  1726.                Bar(X1+1),(Y1+1) To(X2-1),(Y2-1)
  1727.                BLUE=C mod 16
  1728.                GREEN=(C/16) mod 16
  1729.                RED=(C/256) mod 16
  1730.                VSLIDE[STX+STGP,T1,STX+STGP+GAP,YSTART+2*GP+DIFY,RED]
  1731.                VSLIDE[STX+STGP+GAP+GP,T1,STX+STGP+GP+2*GAP,YSTART+2*GP+DIFY,GREEN]
  1732.                VSLIDE[STX+STGP+2*GAP+2*GP,T1,STX+STGP+2*GP+3*GAP,YSTART+2*GP+DIFY,BLUE]
  1733.             End If 
  1734.             If Z>CLR
  1735.                If Z=CLR+1
  1736.                   Repeat 
  1737.                      U=0
  1738.                      If Not(A=X Mouse)
  1739.                         If Not(B=Y Mouse)
  1740.                            Bell 20
  1741.                         End If 
  1742.                      End If 
  1743.                      U=Mouse Zone : K=Mouse Key
  1744.                      A=X Mouse : B=Y Mouse
  1745.                   Until((U>0) and(U<CLR+1)) and(K=1)
  1746.                   U=U-1
  1747.                   If U>31
  1748.                      U=U-32 : Rem To avoid errors working in EHB mode
  1749.                   End If 
  1750.                   If CURCOL>31
  1751.                      CURCOL=CURCOL-32
  1752.                   End If 
  1753.                   TEMP=Colour(CURCOL)
  1754.                   Colour CURCOL,Colour(U)
  1755.                   Colour U,TEMP
  1756.                End If 
  1757.                If Z=CLR+2
  1758.                   FINISHED=True
  1759.                End If 
  1760.                If Z=CLR+3 or Z=CLR+4
  1761.                   Repeat 
  1762.                      If Not(A=X Mouse)
  1763.                         If Not(B=Y Mouse)
  1764.                            Bell 20
  1765.                         End If 
  1766.                      End If 
  1767.                      U=Mouse Zone : K=Mouse Key
  1768.                      A=X Mouse : B=Y Mouse
  1769.                   Until((U>0) and(U<CLR+1)) and(K=1)
  1770.                   If Z=CLR+3
  1771.                      PALFOR=U-1
  1772.                   Else 
  1773.                      PALBAK=U-1
  1774.                   End If 
  1775.                   FINISHED=True
  1776.                   CHNGPAL=True
  1777.                End If 
  1778.                If Z=CLR+5
  1779.                   DEFPAL
  1780.                   FINISHED=True
  1781.                   CHNGPAL=True
  1782.                End If 
  1783.                If(Z>CLR+5) and(Z<CLR+9)
  1784.                   Repeat 
  1785.                      POS=(16*(YSTART+2*GP+DIFY-Y Screen(Y Mouse)))/(YSTART+2*GP+DIFY-T1)
  1786.                      If POS<1
  1787.                         POS=1
  1788.                      End If 
  1789.                      If POS>16
  1790.                         POS=16
  1791.                      End If 
  1792.                      If Z=CLR+6
  1793.                         RED=POS
  1794.                         VSLIDE[STX+STGP,T1,STX+STGP+GAP,YSTART+2*GP+DIFY,RED]
  1795.                         RED=RED-1
  1796.                      Else 
  1797.                         If Z=CLR+7
  1798.                            GREEN=POS
  1799.                            VSLIDE[STX+STGP+GAP+GP,T1,STX+STGP+GP+2*GAP,YSTART+2*GP+DIFY,GREEN]
  1800.                            GREEN=GREEN-1
  1801.                         Else 
  1802.                            If Z=CLR+8
  1803.                               BLUE=POS
  1804.                               VSLIDE[STX+STGP+2*GAP+2*GP,T1,STX+STGP+2*GP+3*GAP,YSTART+2*GP+DIFY,BLUE]
  1805.                               BLUE=BLUE-1
  1806.                            End If 
  1807.                         End If 
  1808.                      End If 
  1809.                      Set Pattern 0
  1810.                      If CURCOL>31
  1811.                         CURCOL=CURCOL-32
  1812.                      End If 
  1813.                      Colour CURCOL,(RED*256)+(GREEN*16)+BLUE
  1814.                   Until Not(Mouse Key mod 2)=1
  1815.                End If 
  1816.             End If 
  1817.          End If 
  1818.       Until FINISHED
  1819.       Put Cblock 1
  1820.    Until Not CHNGPAL
  1821.    Del Cblock 1
  1822.    Reserve Zone 
  1823.    Change Mouse MSTORE
  1824.    Volume 63
  1825.    Set Pattern 0
  1826.    CLRSB=Colour(0)
  1827.    If TTOOLS
  1828.       Screen 2
  1829.       Colour 0,CLRSB
  1830.       Screen 0
  1831.    End If 
  1832.    Menu On 
  1833. End Proc
  1834. Procedure DEFPAL
  1835.    '
  1836.    ' My Default Palette 
  1837.    '
  1838.    Colour 0,0
  1839.    Colour 1,$A40
  1840.    If CLR>2
  1841.       Colour 2,$FFF
  1842.       Colour 3,0
  1843.       If CLR>4
  1844.          Colour 4,$F00
  1845.          Colour 5,$F0
  1846.          Colour 6,$F
  1847.          Colour 7,$666
  1848.          If CLR>8
  1849.             Colour 8,$555
  1850.             Colour 9,$333
  1851.             Colour 10,$733
  1852.             Colour 11,$373
  1853.             Colour 12,$773
  1854.             Colour 13,$337
  1855.             Colour 14,$737
  1856.             Colour 15,$377
  1857.             If CLR>16
  1858.                Colour 16,$0
  1859.                Colour 17,$EC8
  1860.                Colour 18,$C60
  1861.                Colour 19,$EA0
  1862.                Colour 20,$27F
  1863.                Colour 21,$49D
  1864.                Colour 22,$5AE
  1865.                Colour 23,$ADF
  1866.                Colour 24,$BDF
  1867.                Colour 25,$CEF
  1868.                Colour 26,$FFF
  1869.                Colour 27,$408
  1870.                Colour 28,$A0E
  1871.                Colour 29,$E0E
  1872.                Colour 30,$E08
  1873.                Colour 31,$EEE
  1874.             End If 
  1875.          End If 
  1876.       End If 
  1877.    End If 
  1878.    PALFOR=INITFOR
  1879.    PALBAK=INITBAK
  1880. End Proc
  1881. Procedure VSLIDE[A,B,C,D,P]
  1882.    '
  1883.    ' My Slider Bars for procedure PAL,
  1884.    ' It's here to cut down on the number of parameters I had to remember
  1885.    ' whilst writing PAL. (Believe it or not, this procedure, I found was one  
  1886.    ' of the trickier ones! It was originally written, with PAL, REQ and REQBOX
  1887.    ' for AMOS_BROT V1.0 ) 
  1888.    '
  1889.    Set Slider PALFOR,PALBAK,PALFOR,,PALBAK,PALBAK,PALFOR,
  1890.    Vslider A,B To C,D,16,16-P,1
  1891. End Proc
  1892.