home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / sourcecode / general / scbm.amos / scbm.amosSourceCode < prev   
Encoding:
AMOS Source Code  |  1990-04-08  |  10.7 KB  |  416 lines

  1. ST
  2. MAIN
  3. FINAL
  4. Procedure ST
  5. Hide 
  6. Music 1
  7. 'break off 
  8.  Screen Close 0 : Rem delete befor compiling!
  9. End Proc
  10. Procedure MAIN
  11.    Unpack 7 To 1
  12.    Screen Hide 1
  13.    Unpack 7 To 0
  14.    Palette $0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0
  15.    Screen 0
  16.    Fade 5 To 1
  17.    Wait 75
  18.    Screen Open 1,620,150,4,Hires
  19.    Screen Display 1,,120,,
  20.    Flash Off 
  21.    Curs Off 
  22.    Paper 0
  23.    Cls 
  24.    Palette $0,$FFF,$F80,$FFF
  25.    Flash 3,"(fff,5)(000,5)"
  26.    Set Rainbow 0,1,32,"","",""
  27.    Rainbow 0,0,119,150
  28.    For Q=1 To 32
  29.       Read CL
  30.       Rain(0,Q-1)=CL
  31.    Next Q
  32.    Dim C(8)
  33.    C(1)=%0
  34.    C(2)=%11000
  35.    C(3)=%111100
  36.    C(4)=%1111110
  37.    C(5)=%111100
  38.    C(6)=%11000
  39.    C(7)=%0
  40.    C(8)=%0
  41.    Curs Pen 3
  42.    Set Curs C(1),C(2),C(3),C(4),C(5),C(6),C(7),C(8)
  43.    Curs On 
  44.    Data $0,$0,$100,$200,$300,$400,$500,$600,$700,$800,$900,$A00,$B00,$C00,$D00,$E00,$F00,$F00,$E00,$D00,$C00,$B00,$A00,$900,$800,$700,$600,$500,$400,$300,$200,$100
  45.    Set Rainbow 1,0,16,"","",""
  46.    Set Rainbow 2,0,16,"","",""
  47.    Rainbow 1,0,100,16
  48.    Rainbow 2,0,270,16
  49.    For Q=0 To 15
  50.       Read C
  51.       Rain(1,Q)=C
  52.       Rain(2,Q)=C
  53.       View 
  54.       Wait Vbl 
  55.    Next Q
  56.    Data $2,$4,$116,$448,$77A,$AAC,$DDE,$FFF,$EDD,$CAA,$A77,$844,$611,$400,$200
  57.    Data $0
  58.    A$="Loop: For R0=0 To 31 ; Let X=R0 ; Pause ; Next R0 ; Jump Loop "
  59.    Channel 1 To Rainbow 0
  60.    Amal 1,A$
  61.    Amal On 1
  62.    Pen 1
  63.    '     |                                                                           |  
  64.    Print "***************************************************************************"
  65.    Print "* ";
  66.    Pen 2
  67.    Print "              Sin/Cos Bank Maker V1 By Yazoo of Bitmap!!               ";
  68.    Pen 1
  69.    Print " *"
  70.    Print "***************************************************************************"
  71.    Pen 2
  72.    Print 
  73.    Print " Type COMMAND for a list in commands!! "
  74.    Print 
  75.    Pen 1
  76.    Print " Type News for urgent news!!"
  77.    Print 
  78.    Pen 2
  79.    On Error Goto ERR
  80.    MAIN:
  81.    Input ">";CM$
  82.    CM$=Lower$(CM$)
  83.    If CM$="" Then Goto MAIN
  84.    If CM$="command" Then Goto COMMAND
  85.    If CM$="quit" Then Goto Q
  86.    If CM$="about" Then Goto ABOUT
  87.    If CM$="credits" Then Goto CRED
  88.    If CM$="start" Then Goto STAT
  89.    If CM$="info" Then Goto INFO
  90.    If CM$="news" Then Goto NWS
  91.    If CM$="notes" Then Goto NO
  92.    If CM$="bitmap" Then Goto BIT
  93.    Pen 1
  94.    Print 
  95.    Print " Error - Command not understood, type 'Command' for a list off commands!"
  96.    Print 
  97.    Pen 2
  98.    Goto MAIN
  99.    COMMAND:
  100.    Pen 1
  101.    Print 
  102.    Print " Here is a list off all commands!! "
  103.    Print 
  104.    Pen 2
  105.    Print " Command     - This list."
  106.    Print " Quit        - Quit the progie."
  107.    Print " About       - About!"
  108.    Print " Credits     - Credits."
  109.    Print " Start       - Start Sin/Cos maker!"
  110.    Print " Info        - Infomation on how to use this util!"
  111.    Print " News        - BP is dead BITMAP is here, read this!!"
  112.    Print " Notes       - Some Release notes."
  113.    Print " Bitmap      - Member List."
  114.    Print 
  115.    Pen 2
  116.    Goto MAIN
  117.    Q:
  118.    Pen 1
  119.    Print 
  120.    Print " Are you shure you want to quit?"
  121.    Pen 2
  122.    QQ:
  123.    Print 
  124.    Print " Enter 'Yes' of 'No'."
  125.    Print 
  126.    Input " Quit?>";CM$
  127.    CM$=Lower$(CM$)
  128.    If CM$="yes" Then Goto DN
  129.    If CM$="no" Then Print : Goto MAIN
  130.    Goto QQ
  131.    DN:
  132.    Print 
  133.    Cls 
  134.    Print " (C) Bitmap 1991"
  135.    Print 
  136.    Print " This progie is >> PRODUCT WARE << and is P.D."
  137.    Print 
  138.    Print " Watch out for more Bitmap Products!! "
  139.    Print 
  140.    Print " Product Ware:"
  141.    Print 
  142.    Print " If you use this, send us ya product, which uses the bank creator,"
  143.    Print " and please greet us, and say you use our bank!"
  144.    Print 
  145.    Print " Bye!!"
  146.    Wait 200
  147.    Pop Proc
  148.    ABOUT:
  149.    Pen 1
  150.    Print "***************************************************************************"
  151.    Print "* ";
  152.    Pen 2
  153.    Print "              Sin/Cos Bank Maker V1 By Yazoo of Bitmap!!               ";
  154.    Pen 1
  155.    Print " *"
  156.    Print "***************************************************************************"
  157.    Pen 2
  158.    Print 
  159.    Print " This program was made to help AMOS users, who need the extra speed"
  160.    Print " In their games/utils/demos. If your program needs to use the command 'SIN'"
  161.    Print " or 'COS' then this progie realy would improve the speed, you also would"
  162.    Print " the need for the 'Maths.Libary' to be on the disk."
  163.    Print " as long as you don't use any other maths stuff!! "
  164.    Print 
  165.    Print " Greets to: Syntex, Fanatix, Robots, Hannsis 5, Amos P.D. and all AMOS fans!"
  166.    Print 
  167.    Print " Conact me for swapping AMOS stuff and/or P.D. stuff, my address is... "
  168.    Print " 104 London Road, Stanway, Colchester, Essex, CO3 5HD, England!! "
  169.    Print " or phone (0206) 549835."
  170.    Print 
  171.    Goto MAIN
  172.    CRED:
  173.    Pen 2
  174.    Print 
  175.    Print " Here are the Credits..."
  176.    Print 
  177.    Print " Code & GFX & Idea :";
  178.    Pen 1
  179.    Print "YAZOO of BITMAP!"
  180.    Print 
  181.    Pen 2
  182.    Print " Music :";
  183.    Pen 1
  184.    Print "From the AMAZE Music disk."
  185.    Print 
  186.    Pen 2
  187.    Goto MAIN
  188.    STAT:
  189.    Cls 
  190.    Pen 1
  191.    Print "Sin/Cos Bank maker is now active, follow all on screen prompts!"
  192.    Print "O.K. Here we go..."
  193.    Print 
  194.    Wait 75
  195.    Cls 
  196.    Print "* Genarting Bank - Please Wait *"
  197.    Reserve As Work 10,7200
  198.    Print 
  199.    Pen 2
  200.    Print " Genarating ";
  201.    Pen 1
  202.    Print "SINE"
  203.    Degree 
  204.    For Q#=1 To 360 Step 0.1
  205.       NUM=Sin(Q#)*100+100
  206.       Poke(Start(10)+(Q#*10)),NUM
  207.    Next Q#
  208.    Print 
  209.    Pen 2
  210.    Print " Genarating ";
  211.    Pen 1
  212.    Print "COSINE"
  213.    For Q#=1 To 360 Step 0.1
  214.       NUM=Cos(Q#)*100+100
  215.       Poke(Start(10)+(Q#*10)+3600),NUM
  216.    Next Q#
  217.    Poke(Start(10)-8),Asc("B")
  218.    Poke(Start(10)-7),Asc("I")
  219.    Poke(Start(10)-6),Asc("T")
  220.    Poke(Start(10)-5),Asc("M")
  221.    Poke(Start(10)-4),Asc("A")
  222.    Poke(Start(10)-3),Asc("P")
  223.    Poke(Start(10)-2),Asc("9")
  224.    Poke(Start(10)-1),Asc("1")
  225.    Print 
  226.    Pen 2
  227.    Print " Bank Made!!"
  228.    Print 
  229.    Print " Make sure disk is ";
  230.    Pen 1 : Print "Write Enabled";
  231.    Pen 2 : Print " or an error will occur!"
  232.    Print " Type 'Cancel' to cancel operation!"
  233.    AG:
  234.    Input " Please enter a name For the bank to be saved as :";NME$
  235.    If Lower$(NME$)="cancel" Then Goto FS
  236.    If NME$="" Then Goto AG
  237.    If Exist(NME$) Then Goto EXI
  238.    SA:
  239.    Save NME$,10
  240.    Erase 10
  241.    Goto MAIN
  242.    EXI:
  243.    Print 
  244.    Pen 1
  245.    Print " FILE EXISIS!"
  246.    Pen 2
  247.    Print 
  248.    Print " Do you want me to over write?"
  249.    Print 
  250.    HRE:
  251.    Input " Over Write? (Yes/No) ";OVR$
  252.    Print 
  253.    OVR$=Lower$(OVR$)
  254.    If OVR$="" Then Goto HRE
  255.    If OVR$="yes" Then Goto SA
  256.    If OVR$="no" Then Goto AG
  257.    Goto HRE
  258.    FS:
  259.    Erase 10
  260.    Print 
  261.    Pen 1
  262.    Print " Operation Canceled!"
  263.    Print 
  264.    Pen 2
  265.    Goto MAIN
  266.    ERR:
  267.    Pen 1
  268.    Print 
  269.    Print " A Error has occured, Task held."
  270.    Print 
  271.    Print "Aborting Programme, Please Re Run!!"
  272.    Print 
  273.    Print "Press CTRL and C to stop!"
  274.    Pen 2
  275.    Do 
  276.    Loop 
  277.    Resume 
  278.    Goto MAIN
  279.    INFO:
  280.    Pen 1
  281.    Print " * How to use this utility in YOUR amos progs *"
  282.    Pen 2
  283.    Print "Well it is very easy, in stead off using sine, you use the 'PEEK' command"
  284.    Print "in the following format.."
  285.    Print 
  286.    Print "    X=PEEK(Start(Y)+OFF) "
  287.    Print 
  288.    Print "Where X is the varible you want to load the result into."
  289.    Print "Y is the bank number of the SIN/COS back (Called 'BITMAP91')."
  290.    Print "OFF is the number you would put in the bracket when using SIN/COS"
  291.    Print "while you would be on 'Degee' mode instead of 'Radian'."
  292.    Print "Here is a example..."
  293.    Print "    X=Sin(90.5)"
  294.    Print "    Would Become"
  295.    Print "    X=Peek(Start(Y)+905)"
  296.    Print "That would be for SIN * ONLY *"
  297.    Print "To use COS you would use X=Peek(Start(Y)+905+3601)"
  298.    Print "As the COS numbers are stored 3601 bytes further on in the bank!"
  299.    Pen 1
  300.    Print "Press a Key to contine...";
  301.    Do 
  302.       K$=Inkey$
  303.       If Scancode<>0 Then Exit 
  304.    Loop 
  305.    Print 
  306.    Print "A Program to plot a circle, where the Bank number is 10."
  307.    Print 
  308.    Pen 2
  309.    Print "For I=1 to 3600"
  310.    Print "  X=Peek(Start(10)+I) : Rem Get SIN Varible from Bank 10."
  311.    Print "  Y=Peek(Start(10)+I+3601) : Rem Get COS Varible from Bank 10"
  312.    Print "  Plot X,Y"
  313.    Print "Next I"
  314.    Print 
  315.    Print "Easy No??"
  316.    Print "Dont forget to make a screen etc!"
  317.    Print "Well thats it, if you have problems, write to me at the address in"
  318.    Print "the 'About' bit!! (Just type About!)"
  319.    Print " NOTE: If you want the same result as SIN/COS would give then"
  320.    Print "Minus 100 from the number you get and divide it by 100."
  321.    Print "If you dont, you will get a possitive number from ) to 200."
  322.    Print "That could be the only hard bit 'bout this progie!"
  323.    Pen 1
  324.    Print "Enjoy this prod, and write me if ya any problems!!"
  325.    Pen 2
  326.    Goto MAIN
  327.    NWS:
  328.    Pen 1
  329.    Print 
  330.    Print "*** BITMAP NEWS ***"
  331.    Print "-------------------"
  332.    Print 
  333.    Pen 2
  334.    Print " Bitmaped Productions is *";
  335.    Pen 1
  336.    Print "DEAD";
  337.    Pen 2
  338.    Print "*"
  339.    Print 
  340.    Pen 1
  341.    Print " BITMAP";
  342.    Pen 2
  343.    Print " is ";
  344.    Pen 1
  345.    Print "BORN";
  346.    Pen 2
  347.    Print "!"
  348.    Print 
  349.    Print " In other words, Bitmaped Productions are now called BITMAP!"
  350.    Print " All the same members, so now greet us at BITMAP!!"
  351.    Print 
  352.    Goto MAIN
  353.    NO:
  354.    Pen 1
  355.    Print 
  356.    Print "******  *******  *******  ******   *****   ***** "
  357.    Print "***   *   ***      ***    *** * *  ***  *  ***  *"
  358.    Print "*******   ***      ***    *** * *  ******  ******"
  359.    Print "***   *   ***      ***    ***   *  ***  *  ***"
  360.    Print "******  *******    ***    ***   *  ***  *  ***"
  361.    Print 
  362.    Print "                 Presents"
  363.    Print 
  364.    Print "       *** SIN/COS BANK GENARATOR ***"
  365.    Print 
  366.    Print "Release Notes..."
  367.    Pen 2
  368.    Print 
  369.    Print " V1: This is the first Ganarator, off many!"
  370.    Print " The error routine is not working properly! which"
  371.    Print " means if a disk is write protected and you select cancel"
  372.    Print " you will have to re-run the programme! Sorry!!"
  373.    Print " If you find any bugs, write to me! CU L8R M8!!"
  374.    Pen 2
  375.    Goto MAIN
  376.    BIT:
  377.    Pen 1
  378.    Print " ** Bitmap Member List... **"
  379.    Pen 2
  380.    Print 
  381.    Print "Yazoo    - Code, Graphics               (YZO)"
  382.    Print "Mercury  - Graphics (Learning AMOS)     (MCY)"
  383.    Print "K-Tel    - (??)                         (KTL)"
  384.    Print 
  385.    Goto MAIN
  386. End Proc
  387. Procedure FINAL
  388.    Flash Off 
  389.    For Q=0 To 15
  390.       Rain(1,Q)=0
  391.       Rain(2,Q)=0
  392.       View 
  393.       Wait Vbl 
  394.    Next Q
  395.    Rainbow Del 
  396.    Fade 1
  397.    Screen 1
  398.    Wait 15
  399.    For Q=63 To 0 Step -1
  400.       Volume Q
  401.       Wait 1
  402.    Next Q
  403.    Music Off 
  404.    Volume 63
  405.    Screen 0
  406.    Fade 5
  407.    Wait 75
  408.    Screen Close 1
  409.    Screen Close 0
  410. End Proc
  411. Procedure MESSY
  412. NOE$=" ** Sin,Cos Bank maker! ** From BITMAP 1991, Code, Gfx, Idea : Yazoo   Music: AMAZE!"
  413. BOLLOX$="OI! WHAT ARE YOU DOING??? Are you fucking with my code???"
  414. BOLLOX$=BOLLOX$+" Just fuck off o.k.???"
  415. BOLLOX$=BOLLOX$+" ALL THIS CODE IS (C) BITMAP 1991, If you so much as change a byte, you are liable for prosicution!!! So FUCK on that!"
  416. End Proc