home *** CD-ROM | disk | FTP | other *** search
/ Merciful 3 / Merciful_Release_3.bin / software / h / henrys_house / henryshouse1.dms / henryshouse1.adf / SourceCode / SelectLevel.Asc < prev    next >
Text File  |  1993-06-20  |  19KB  |  591 lines

  1. '                                Henry's House 
  2. '
  3. '                           SELECT LEVEL SOURCE CODE 
  4. '
  5. '                          by : Gurmita & Sucha Singh
  6. '
  7. '----------------------------------------------------------------------------- 
  8. ' NOTE:This source code can not be Run through the AMOS editor as some files 
  9. ' need to be copied into memory which is done in the startup-sequence of the 
  10. ' Game(see Intro source code). 
  11. '
  12. ' The following source code reseaves the Main variables LIVES,SC,EXSC and
  13. ' LEVEL.It then displays the doors depending on which level you have just come 
  14. ' from then waits until you have picked a level. 
  15. '
  16. ' Memory Banks Used: 
  17. '  1 - Sprites - Sprites 
  18. '  5 - Sound - Main samples
  19. ' 10 - Pac Pic - House background
  20. ' 11 - Pac Pic - Level 1 loading picture 
  21. ' 12 - Pac Pic - Level 2 loading picture 
  22. ' 13 - Pac Pic - Level 3 loading picture 
  23. ' 14 - Pac Pic - Level 4 loading picture 
  24. ' 15 - Pac Pic - Level 5 loading picture 
  25. '
  26. ' Bobs and Sprites Used: 
  27. ' Bob 1 - Level 1 door 
  28. ' Bob 2 - Level 2 door 
  29. ' Bob 3 - Level 3 door 
  30. ' Bob 4 - Level 4 door 
  31. ' Bob 5 - Level 5 door 
  32. ' Sprite 8 - Player
  33. '
  34. ' Variables Used:
  35. ' X     - Player sprites x coordinates.  
  36. ' Y     - Player sprites y coordinates.
  37. ' I     - Player sprite Image. 
  38. ' D     - Start direction image for player.
  39. ' BLINK - Time taken for player to start blinking if left alone. 
  40. ' F     - The platform colour which you collide with.
  41. ' N     - The current height of Henry when jumping.
  42. ' SC    - Your current score.
  43. ' EXSC  - Increases with your score but gets set to 0 if it equals 2000 when 
  44. '         you get an extra life. 
  45. ' LEVEL - The level number which effects the images of the doors.
  46. ' LIVES - Number of lives Henry has. 
  47. '
  48. '----------------------------------------------------------------------------- 
  49. '
  50. ' Closes the AMOS editor to save memory. 
  51. Close Editor 
  52. '
  53. ' Makes the variables global so the whole program can access them. 
  54. Global X,Y,I,D,F,N,SC,EXSC,LEVEL,LIVES,BLINK
  55. '
  56. 'Sets the variables
  57. X=310 : Y=187 : I=1 : D=0 : BLINK=0
  58. '
  59. '----------------------------------------------------------------------------- 
  60. ' Calls the SETUP procedure. 
  61. _SETUP
  62. '
  63. ' Creates a mask for the sprites,sets Autoback to manual,turns off the 
  64. ' automatic updating and updates every 2 vertical blank periods to make the
  65. ' Amal animations smoother.
  66. Make Mask : Autoback 0 : Update Off : Update Every 2
  67. '
  68. '----------------------------------------------------------------------------- 
  69. ' Calls the BLINK procedure. 
  70. _BLINK
  71. '
  72. ' Calls the MAINLOOP procedure.
  73. _MAINLOOP
  74. '----------------------------------------------------------------------------- 
  75. '
  76. ' Uses Screen Swap which updates everything at once so making the Game run 
  77. ' faster.Checks for collisions,the joystic and the platforms.
  78. Procedure _MAINLOOP
  79.    '
  80.    ' Manualy updates all the bobs so there is no flicker at the start.
  81.    Bob Clear : Bob Draw 
  82.    '
  83.    ' The loop is divided into two parts. The first is used to perform the 
  84.    ' various instructions in your program and the secound part repeats the
  85.    ' above contents.This keeps the loop in sync.
  86.    Do 
  87.       ' Swaps between the Phisical and Logical screens then clears the screen
  88.       ' of bobs. 
  89.       Screen Swap 0
  90.       Wait Vbl 
  91.       Bob Clear 
  92.       '
  93.       ' Sets the Joystic.
  94.       J=Joy(1)
  95.       '
  96.       ' Checks the collision between you and the 5 doors.If the image is of a
  97.       ' blank door and you press fire on it then you go to the relevant procedure. 
  98.       If I Bob(1)=16 and J=16 and Spritebob Col(8,1 To 1) Then _LEVEL_ONE
  99.       If I Bob(2)=16 and J=16 and Spritebob Col(8,2 To 2) Then _LEVEL_TWO
  100.       If I Bob(3)=16 and J=16 and Spritebob Col(8,3 To 3) Then _LEVEL_THREE
  101.       If I Bob(4)=16 and J=16 and Spritebob Col(8,4 To 4) Then _LEVEL_FOUR
  102.       If I Bob(5)=16 and J=16 and Spritebob Col(8,5 To 5) Then _LEVEL_FIVE
  103.       '
  104.       ' Checks for the joystic and floor,so if Henry is left alone on a
  105.       ' platform the variable 'BLINK' increases or else it equals 0. 
  106.       If J=0 and F=2 Then Inc BLINK Else BLINK=0
  107.       '
  108.       ' If BLINK is greater than 20(amount of time to stand still before Henry 
  109.       ' starts to blink) then it calls the BLINK procedure.
  110.       If BLINK>20 Then _BLINK
  111.       '
  112.       ' Checks Left & Right joystic directions.If the joystic has been moved 
  113.       ' and Henry is away from the edge then he will either move left or right.
  114.       ' The variable D sets the starting frame depending on the joystic direction
  115.       ' you have moved.It then adds the frames to make Henry look like he is walking.
  116.       If J=4 and X>154 Then Dec X : D=6 : Inc C : If C mod 4=0 Then Add I,1,1 To 6
  117.       If J=8 and X<424 Then Inc X : D=0 : Inc C : If C mod 4=0 Then Add I,1,1 To 6
  118.       '
  119.       ' Checks for Up,Up left and Up right directions.If the joystic has been
  120.       ' moved in either of the up directions and Henry is on the platform then 
  121.       ' the relevant JUMP procedure is called. 
  122.       If J=1 and F=2 Then JUMP_UP
  123.       If J=5 and F=2 Then D=6 : JUMP_LEFT
  124.       If J=9 and F=2 Then D=0 : JUMP_RIGHT
  125.       '
  126.       ' Checks for a collision between a colour on screen and the player sprite. 
  127.       F=Point(X Screen(X Sprite(8)),Y Screen(Y Sprite(8)))
  128.       '
  129.       ' If the colour is not equal to 2(the platform colour) then Henry will fall. 
  130.       If F<>2 Then Inc Y
  131.       '
  132.       ' Updates the player sprite and draws all the bobs on screen.
  133.       Sprite 8,X,Y,I+D
  134.       Sprite Update 
  135.       Bob Draw 
  136.       '
  137.       '----------------------------------------------------------------------- 
  138.       ' Swaps between the Phisical and Logical screens then clears the screen
  139.       ' of bobs. 
  140.       Screen Swap 0
  141.       Wait Vbl 
  142.       Bob Clear 
  143.       J=Joy(1)
  144.       '
  145.       ' Checks for the joystic.By repeating it again it makes Henry walk faster. 
  146.       If J=4 and X>154 Then Dec X : D=6 : Inc C : If C mod 4=0 Then Add I,1,1 To 6
  147.       If J=8 and X<424 Then Inc X : D=0 : Inc C : If C mod 4=0 Then Add I,1,1 To 6
  148.       '
  149.       ' Checks for the collision between Henry and the platforms.
  150.       F=Point(X Screen(X Sprite(8)),Y Screen(Y Sprite(8)))
  151.       If F<>2 Then Inc Y
  152.       '
  153.       ' Updates the player sprite and draws the bobs on screen.
  154.       Sprite 8,X,Y,I+D
  155.       Sprite Update 
  156.       Bob Draw 
  157.    Loop 
  158.    '
  159.    ' Basic Main loop structure used in the Game:
  160.    '
  161.    ' Double buffer }
  162.    ' Autoback 0    } Sets the automatic updating system off.
  163.    ' Update Off    }
  164.    '
  165.    ' Do 
  166.    ' Screen Swap   }
  167.    ' Wait Vbl      } Swaps between phisical & logical screens.
  168.    ' Bob Clear     }
  169.    '
  170.    ' Your program contents. 
  171.    '
  172.    ' Bob Draw 
  173.    '
  174.    ' Screen Swap   }
  175.    ' Wait Vbl      } Swaps between phisical & logical screens.
  176.    ' Bob Clear     }
  177.    '
  178.    ' Repeat contents. 
  179.    '
  180.    ' Bob Draw 
  181.    ' Loop 
  182.    '
  183. End Proc
  184. '
  185. ' Opens up a screen,sets the fonts,reseaves the variables from the last
  186. ' program then loads the bobs and sfx and sets up the images for the doors.
  187. Procedure _SETUP
  188.    '
  189.    ' Hides mouse pointer,opens screen 0 and hides it. 
  190.    Hide On 
  191.    Screen Open 0,320,30,32,Lowres : Screen Hide 0
  192.    Curs Off : Flash Off : Cls 0
  193.    '
  194.    ' Loads fonts from Disk2 then checks all the fonts.  
  195.    Get Disc Fonts 
  196.    Screen 0
  197.    For F=0 To 6
  198.       Set Font F : T$="Amos 12345:"+Str$(F)
  199.       Text 0,0,T$
  200.    Next F
  201.    Cls 0
  202.    '
  203.    ' Reseaves the command line$ then separates its contents into the 4 strings. 
  204.    Set Font 6
  205.    A$=Left$(Command Line$,3)
  206.    B$=Mid$(Command Line$,4,6)
  207.    C$=Mid$(Command Line$,10,5)
  208.    D$=Right$(Command Line$,1)
  209.    '
  210.    ' Converts the 4 strings into variables. 
  211.    LIVES=Val(A$) : SC=Val(B$) : EXSC=Val(C$) : LEVEL=Val(D$)
  212.    '
  213.    ' Prints the Lives,Score and Time onto the control panel.
  214.    If LIVES<10 Then Ink 2,0 : Text 39,20,B$ : Text 144,20,C$
  215.    If LIVES>9 Then Ink 2,0 : Text 27,20,B$ : Text 144,20,C$
  216.    Ink 2,0 : Text 288,20,"80"
  217.    '
  218.    ' Loads the powerpacked bobs and sfx.
  219.    Screen 0
  220.    'Ppload "Henry's_HouseD2:Bobs/SpritesSelect" 
  221.    'Ppload "Henry's_HouseD2:Sound/Mainsfx",5  
  222.    '
  223.    ' Unpacks the background to screen 0,hides it then gets the sprite palette 
  224.    ' and double buffers the screen. 
  225.    Unpack 10 To 0 : Screen Hide 0
  226.    Get Sprite Palette : Double Buffer 
  227.    '
  228.    ' Sets the hot spot to bottom centre for the player sprites. 
  229.    For N=1 To 12 : Hot Spot N,$12 : Next 
  230.    '
  231.    ' Calls the SETDOORS procedure.
  232.    _SETDOORS
  233.    '
  234.    ' Fades the background to black then fades up the picture to its original colours. 
  235.    Fade 1 : Wait 15
  236.    Screen Show 0
  237.    Fade 1,$0,$BBB,$831,$C97,$A60,$951,$632,$5A,$61,$81,$A1,$897,$776,$665,$444,$333,$34,$0,$888,$FFF,$520,$840,$B70,$FB0,$486,$5A8,$5CA,$8E,$8,$A01,$D01,$EC8
  238.    Wait 15
  239.    '
  240.    ' Sets the volume for all channels to maximum and updates the bobs.
  241.    Volume %1111,63
  242.    Bob Clear : Bob Draw 
  243.    '
  244. End Proc
  245. '
  246. ' Makes Henry Jump up. 
  247. Procedure JUMP_UP
  248.    '
  249.    ' Play the jumping sfx.
  250.    Sam Play %1100,5
  251.    '
  252.    ' First 'for next' loop makes Henry move up. 
  253.    For N=1 To 26
  254.       Dec Y
  255.       Sprite 8,X,Y,I+D
  256.       Update 
  257.       Wait Vbl 
  258.    Next 
  259.    '
  260.    ' Secound loop makes Henry come down and checks for collision with any 
  261.    ' platforms. 
  262.    For N=1 To 26
  263.       F=Point(X Screen(X Sprite(8)),Y Screen(Y Sprite(8)))
  264.       If F<>2 Then Inc Y
  265.       ' If Henry touches a platform before he has finished coming down then
  266.       ' it exits out of the for next loop by making N=26.
  267.       If F=2 Then N=26
  268.       Sprite 8,X,Y,I+D
  269.       Update 
  270.       Wait Vbl 
  271.    Next 
  272.    '
  273.    ' Reset 'N' variable and clear the bobs to keep in sync with mainloop. 
  274.    N=1
  275.    Bob Clear 
  276.    '
  277. End Proc
  278. '
  279. ' Makes Henry Jump up and left.
  280. Procedure JUMP_LEFT
  281.    '
  282.    ' Play the jumping sfx.
  283.    Sam Play %1100,5
  284.    '
  285.    ' First 'for next' loop makes Henry move up and left.
  286.    For N=1 To 26
  287.       Add I,1,1 To 6 : Dec Y : If X>154 Then Dec X
  288.       Sprite 8,X,Y,I+D
  289.       Update 
  290.       Wait Vbl 
  291.    Next N
  292.    '
  293.    ' Secound loop makes Henry come down and move left while checking for
  294.    ' collisions with any platforms. 
  295.    For N=1 To 26
  296.       F=Point(X Screen(X Sprite(8)),Y Screen(Y Sprite(8)))
  297.       Add I,1,1 To 6 : If X>154 Then Dec X
  298.       If F<>2 Then Inc Y
  299.       ' If Henry touches a platform before he has finished coming down then
  300.       ' it exits out of the for next loop by making N=26.
  301.       If F=2 Then N=26
  302.       Sprite 8,X,Y,I+D
  303.       Update 
  304.       Wait Vbl 
  305.    Next N
  306.    '
  307.    ' Reset 'N' variable and clear the bobs to keep in sync with mainloop. 
  308.    N=1
  309.    Bob Clear 
  310.    '
  311. End Proc
  312. '
  313. ' Makes Henry Jump up and right. 
  314. Procedure JUMP_RIGHT
  315.    '
  316.    ' Play the jumping sfx.
  317.    Sam Play %1100,5
  318.    '
  319.    ' First 'for next' loop makes Henry move up and right. 
  320.    For N=1 To 26
  321.       Add I,1,1 To 6 : Dec Y : If X<424 Then Inc X
  322.       Sprite 8,X,Y,I+D
  323.       Update 
  324.       Wait Vbl 
  325.    Next 
  326.    '
  327.    ' Secound loop makes Henry come down and move right while checking for 
  328.    ' collisions with any platforms. 
  329.    For N=1 To 26
  330.       F=Point(X Screen(X Sprite(8)),Y Screen(Y Sprite(8)))
  331.       Add I,1,1 To 6 : If X<424 Then Inc X
  332.       If F<>2 Then Inc Y
  333.       ' If Henry touches a platform before he has finished coming down then
  334.       ' it exits out of the for next loop by making N=26.
  335.       If F=2 Then N=26
  336.       Sprite 8,X,Y,I+D
  337.       Update 
  338.       Wait Vbl 
  339.    Next 
  340.    '
  341.    ' Reset 'N' variable and clear the bobs to keep in sync with mainloop. 
  342.    N=1
  343.    Bob Clear 
  344.    '
  345. End Proc
  346. '
  347. ' Makes Henry start blinking.
  348. Procedure _BLINK
  349.    '
  350.    ' Set the Amal animation of Henry blinking and turn the automatic updating on. 
  351.    Channel 1 To Sprite 8
  352.    Sprite 8,X,Y,
  353.    A$="A 0,(13,30)(14,10)(13,10)(14,10);"
  354.    Amal 1,A$ : Amal On 1 : Update On 
  355.    '
  356.    ' Small loop which repeats itself until you move Henry.
  357.    Do 
  358.       ' Set joystic and check for collisions between the player and doors. 
  359.       J=Joy(1)
  360.       If I Bob(1)=16 and J=16 and Spritebob Col(8,1 To 1) Then _LEVEL_ONE
  361.       If I Bob(2)=16 and J=16 and Spritebob Col(8,2 To 2) Then _LEVEL_TWO
  362.       If I Bob(3)=16 and J=16 and Spritebob Col(8,3 To 3) Then _LEVEL_THREE
  363.       If I Bob(4)=16 and J=16 and Spritebob Col(8,4 To 4) Then _LEVEL_FOUR
  364.       If I Bob(5)=16 and J=16 and Spritebob Col(8,5 To 5) Then _LEVEL_FIVE
  365.       '
  366.       ' Check for any joystic movement then exits out of loop. 
  367.       If J>0 Then Exit 
  368.       ' Wait for a vertical blank. 
  369.       Wait Vbl 
  370.    Loop 
  371.    '
  372.    ' Turns off blinking animation,automatic updateing and resets the BLINK timer. 
  373.    Amal Off 1 : Update Off : BLINK=0
  374.    '
  375.    ' Updates the bobs,swaps the screen and then clears the bobs on screen.This
  376.    ' is so the program can stay in sync when returning to mainloop. 
  377.    Bob Clear : Bob Draw : Screen Swap 0 : Wait Vbl : Bob Clear 
  378.    '
  379. End Proc
  380. '
  381. ' Reverses the player images to make Henry's left facing images. 
  382. Procedure _REVERSESPRITES
  383.    '
  384.    ' Goes through the image of player,gets the image,sets the hot spot then 
  385.    ' pastes the fliped image. 
  386.    For N=1 To 6
  387.       Bob 1,16,27,N : Wait Vbl : Get Bob N+6,9,1 To 25,28
  388.       Hot Spot N+6,$12 : Paste Bob 500,500,Hrev(N+6)
  389.    Next : Bob Off 1 : Wait Vbl 
  390.    '
  391. End Proc
  392. '
  393. ' Sets the images for the doors depending on the LEVEL variable. 
  394. Procedure _SETDOORS
  395.    '
  396.    ' Each 'If' statement holds the different combinations of door images which
  397.    ' are changed when you choose a level. 
  398.    ' If the bobs image=15 then the door has the 'No Entry' sign on it and can 
  399.    ' not be opened. 
  400.    ' If the bobs image=16 then the door has no sign on it so you can open it. 
  401.    ' If the bobs image=18 then the door has a tick on it meaning you have 
  402.    ' finished that level. 
  403.    If LEVEL=0
  404.       Bob 1,217,117,16
  405.       Bob 2,139,117,16
  406.       Bob 3,143,53,15
  407.       Bob 4,232,53,15
  408.       Bob 5,72,178,15
  409.    End If 
  410.    If LEVEL=1
  411.       Bob 1,217,117,18
  412.       Bob 2,139,117,16
  413.       Bob 3,143,53,15
  414.       Bob 4,232,53,15
  415.       Bob 5,72,178,15
  416.    End If 
  417.    If LEVEL=2
  418.       Bob 1,217,117,16
  419.       Bob 2,139,117,18
  420.       Bob 3,143,53,15
  421.       Bob 4,232,53,15
  422.       Bob 5,72,178,15
  423.    End If 
  424.    If LEVEL=3
  425.       Bob 1,217,117,18
  426.       Bob 2,139,117,18
  427.       Bob 3,143,53,16
  428.       Bob 4,232,53,16
  429.       Bob 5,72,178,15
  430.    End If 
  431.    If LEVEL=4
  432.       Bob 1,217,117,18
  433.       Bob 2,139,117,18
  434.       Bob 3,143,53,18
  435.       Bob 4,232,53,16
  436.       Bob 5,72,178,15
  437.    End If 
  438.    If LEVEL=5
  439.       Bob 1,217,117,18
  440.       Bob 2,139,117,18
  441.       Bob 3,143,53,16
  442.       Bob 4,232,53,18
  443.       Bob 5,72,178,15
  444.    End If 
  445.    If LEVEL=6
  446.       Bob 1,217,117,18
  447.       Bob 2,139,117,18
  448.       Bob 3,143,53,18
  449.       Bob 4,232,53,18
  450.       Bob 5,72,178,16
  451.    End If 
  452.    '
  453. End Proc
  454. '
  455. ' The following procedures each opens the door to their level,shows their
  456. ' loading picture,sends the main variables and loads their particular level. 
  457. Procedure _LEVEL_ONE
  458.    '
  459.    ' Note:This source code applies to the other LEVEL procedures. 
  460.    '
  461.    ' Resets joystic,changes the door image to that of an opened one then plays  
  462.    ' the DoorOpen sfx.
  463.    J=0
  464.    Bob 1,,,17 : Bob Update 
  465.    Sam Play %1110,1
  466.    '
  467.    ' Fades the screen,turns off all the sprites and bobs then hides screen 0. 
  468.    Wait 10 : Fade 2 : Wait 30 : Bob Off : Sprite Off : Sprite Update : Wait Vbl : Screen Hide 0
  469.    '
  470.    ' Sets the level variable so when you come back the correct doors are opened.
  471.    If LEVEL=2 Then LEVEL=3 Else LEVEL=1
  472.    '
  473.    ' Unpacks the level loading picture to screen 1,hides it,fades it to 
  474.    ' black then fades it into view. 
  475.    Unpack 11 To 1 : Screen Hide 1
  476.    Fade 1 : Wait 15
  477.    Screen Show 1
  478.    Fade 1,$0,$FFF,$777,$BBB,$B70,$950,$730,$520,$62,$82,$A3,$B4,$9C4,$FB0,$256,$0
  479.    Wait 15
  480.    '
  481.    '
  482.    ' Create 4 Main strings to hold the 4 main variables(LIVES,SC,EXSC,LEVEL). 
  483.    A$="   " : B$="      " : C$="     " : D$="  "
  484.    '
  485.    ' Convert the 4 variables into strings.
  486.    L$=Str$(LIVES) : S$=Str$(SC) : E$=Str$(EXSC) : LEV$=Str$(LEVEL)
  487.    '
  488.    ' Then place those strings into the above Main strings.
  489.    Right$(A$,3)=L$ : Left$(B$,6)=S$ : Right$(C$,5)=E$ : Right$(D$,2)=LEV$
  490.    '
  491.    ' Lastly it places the final 4 strings into the Command Line$ to be passed 
  492.    ' through to the next program. 
  493.    Command Line$=A$+B$+C$+D$
  494.    '
  495.    ' Turn off all amal animations,close screen 0,erase all memory banks then
  496.    ' load the Level.
  497.    Amal Off 
  498.    Screen Close 0
  499.    For BANK=0 To 15 : Erase BANK : Next BANK
  500.    Run "HenryGame/level1"
  501.    '
  502. End Proc
  503. '
  504. Procedure _LEVEL_TWO
  505.    J=0
  506.    Bob 2,,,17 : Bob Update 
  507.    Sam Play %1110,1
  508.    Wait 10 : Fade 2 : Wait 30 : Bob Off : Sprite Off : Sprite Update : Wait Vbl : Screen Hide 0
  509.    If LEVEL=1 Then LEVEL=3 Else LEVEL=2
  510.    Unpack 12 To 1 : Screen Hide 1
  511.    Fade 1 : Wait 15
  512.    Screen Show 1
  513.    Fade 1,$0,$FFF,$CCC,$888,$D80,$B60,$940,$730,$520,$5BD,$49B,$378,$256,$244,$543,$0
  514.    Wait 15
  515.    '
  516.    A$="   " : B$="      " : C$="     " : D$="  "
  517.    L$=Str$(LIVES) : S$=Str$(SC) : E$=Str$(EXSC) : LEV$=Str$(LEVEL)
  518.    Right$(A$,3)=L$ : Left$(B$,6)=S$ : Right$(C$,5)=E$ : Right$(D$,2)=LEV$
  519.    Command Line$=A$+B$+C$+D$
  520.    Amal Off 
  521.    Screen Close 0
  522.    For BANK=0 To 15 : Erase BANK : Next BANK
  523.    Run "HenryGame/level2"
  524. End Proc
  525. '
  526. Procedure _LEVEL_THREE
  527.    J=0
  528.    Bob 3,,,17 : Bob Update 
  529.    Sam Play %1110,1
  530.    Wait 10 : Fade 2 : Wait 30 : Bob Off : Sprite Off : Sprite Update : Wait Vbl : Screen Hide 0
  531.    If LEVEL=5 Then LEVEL=6 Else LEVEL=4
  532.    Unpack 13 To 1 : Screen Hide 1
  533.    Fade 1 : Wait 15
  534.    Screen Show 1
  535.    Fade 1,$0,$FFF,$777,$BBB,$CA8,$B86,$A74,$963,$752,$641,$530,$45,$256,$67,$78,$0
  536.    Wait 15
  537.    '
  538.    A$="   " : B$="      " : C$="     " : D$="  "
  539.    L$=Str$(LIVES) : S$=Str$(SC) : E$=Str$(EXSC) : LEV$=Str$(LEVEL)
  540.    Right$(A$,3)=L$ : Left$(B$,6)=S$ : Right$(C$,5)=E$ : Right$(D$,2)=LEV$
  541.    Command Line$=A$+B$+C$+D$
  542.    Amal Off 
  543.    Screen Close 0
  544.    For BANK=0 To 15 : Erase BANK : Next BANK
  545.    Run "HenryGame/level3"
  546. End Proc
  547. '
  548. Procedure _LEVEL_FOUR
  549.    J=0
  550.    Bob 4,,,17 : Bob Update 
  551.    Sam Play %1110,1
  552.    Wait 10 : Fade 2 : Wait 30 : Bob Off : Sprite Off : Sprite Update : Wait Vbl : Screen Hide 0
  553.    If LEVEL=4 Then LEVEL=6 Else LEVEL=5
  554.    Unpack 14 To 1 : Screen Hide 1
  555.    Fade 1 : Wait 15
  556.    Screen Show 1
  557.    Fade 1,$0,$FFF,$777,$BBB,$6DE,$5BC,$5AA,$499,$578,$256,$FE5,$FC4,$FB4,$D83,$A62,$0
  558.    Wait 15
  559.    '
  560.    A$="   " : B$="      " : C$="     " : D$="  "
  561.    L$=Str$(LIVES) : S$=Str$(SC) : E$=Str$(EXSC) : LEV$=Str$(LEVEL)
  562.    Right$(A$,3)=L$ : Left$(B$,6)=S$ : Right$(C$,5)=E$ : Right$(D$,2)=LEV$
  563.    Command Line$=A$+B$+C$+D$
  564.    Amal Off 
  565.    Screen Close 0
  566.    For BANK=0 To 15 : Erase BANK : Next BANK
  567.    Run "HenryGame/level4"
  568. End Proc
  569. '
  570. Procedure _LEVEL_FIVE
  571.    J=0
  572.    Bob 5,,,17 : Bob Update 
  573.    Sam Play %1110,1
  574.    Wait 10 : Fade 2 : Wait 30 : Bob Off : Sprite Off : Sprite Update : Wait Vbl : Screen Hide 0
  575.    LEVEL=0
  576.    Unpack 15 To 1 : Screen Hide 1
  577.    Fade 1 : Wait 15
  578.    Screen Show 1
  579.    Fade 1,$0,$FFF,$777,$BBB,$986,$875,$765,$654,$544,$388,$256,$B55,$955,$9A5,$785,$0
  580.    Wait 15
  581.    '
  582.    A$="   " : B$="      " : C$="     " : D$="  "
  583.    L$=Str$(LIVES) : S$=Str$(SC) : E$=Str$(EXSC) : LEV$=Str$(LEVEL)
  584.    Right$(A$,3)=L$ : Left$(B$,6)=S$ : Right$(C$,5)=E$ : Right$(D$,2)=LEV$
  585.    Command Line$=A$+B$+C$+D$
  586.    Amal Off 
  587.    Screen Close 0
  588.    For BANK=0 To 15 : Erase BANK : Next BANK
  589.    Run "HenryGame/level5"
  590. End Proc
  591.