' If Henry touches a platform before N=34 then N=34 and exits out of loop.
If F=2 Then N=34
'
If Sprite Col(8,10 To 10) Then N=34 : _DEAD
If Spritebob Col(8,1 To 2) Then N=34 : _DEAD
If BONUS=0 and Spritebob Col(8,3 To 3) Then N=34 : _BDEAD
If Spritebob Col(8,5 To 5) Then N=34 : _BONUS
'
If BONUS=1 Then FISH=I Bob(1) : If FISH=19 or FISH=29 Then Sam Bank 6 : Sam Play %1,1
If BONUS=0 and CROW>40 Then Sam Bank 6 : Sam Play %11,3 : CROW=0
If GONG=0 Then Sam Bank 5 : Sam Play %1110,3 : GONG=70
Sprite 8,X,Y,I+D
Update
Wait Vbl
Next
'
' Reset 'N' variable and clear the bobs to keep in sync with mainloop.
N=1
Bob Clear
'
End Proc
'
' Makes Henry start blinking.
Procedure _BLINK
'
' Set the Amal animation of Henry blinking and turn the automatic updating on.
Channel 6 To Sprite 8
Sprite 8,X,Y,
F$="A 0,(88,30)(89,10)(88,10)(89,10);"
Amal 6,F$ : Amal On 6 : Update On
'
' Small loop which repeats itself until you move Henry.
Do
' Call TIME procedure,set joystic,check for collisions between the
' player and enemy and play the soundfx.
_TIME
J=Joy(1)
If Spritebob Col(8,1 To 2) Then Update Off : _DEAD : Exit
If Sprite Col(8,10 To 10) Then Update Off : _DEAD : Exit
If BONUS=0 and Spritebob Col(8,3 To 3) Then Update Off : _BDEAD : Exit
'
If BONUS=1 Then FISH=I Bob(1) : If FISH=19 or FISH=29 Then Sam Bank 6 : Sam Play %1,1
If GONG=0 Then Sam Bank 5 : Sam Play %1110,3 : GONG=70
If BONUS=0 : Inc CROW
If CROW>80 : Sam Bank 6 : Sam Play %11,3 : CROW=0 : End If
End If
'
' Check for any joystic movement then exits out of loop.
If J>0 Then Exit
' Wait for a vertical blank.
Wait Vbl
Loop
'
' Turns off blinking animation,automatic updateing and resets the BLINK timer.
Amal Off 6 : Update Off : BLINK=0 : CROW=0
'
' Depending on the BONUS value the program updates the bobs,swaps the screen
' and then clears the bobs on screen.This is so the program can stay in
' sync when returning to mainloop.
If BONUS=1
Bob Clear : Bob Draw : Screen Swap 0 : Wait Vbl : Bob Clear
End If
If BONUS=0
Bob Clear : Bob Draw : Screen Swap 1 : Wait Vbl : Bob Clear
End If
'
End Proc
'
' Reverses the player images to make Henry's left facing images.
Procedure _REVERSESPRITES
'
' Goes through the image of player,gets the image,sets the hot spot then
' pastes the fliped image.
For N=1 To 6
Bob 1,16,27,N : Wait Vbl : Get Bob N+6,9,1 To 25,28
Hot Spot N+6,$12 : Paste Bob 500,500,Hrev(N+6)
Next : Bob Off 1 : Wait Vbl
'
End Proc
'
' Sets the Amal animations for the enemy.
Procedure _AMAL
'
' Set the Channels for each enemy and their starting positions.
Channel 1 To Sprite 10
Channel 2 To Bob 1
Channel 3 To Bob 2
Sprite 10,290,211,13
Bob 1,114,188,19
Bob 2,260,26,54
'
' Set Amal animation strings for each enemy.
A$="A 0,(13,5); M 0,0,40;"
A$=A$+"Snail:A 0,(13,180); M 120,0,180; A 1,(14,5)(15,5)(16,5)(17,5); M 0,0,20;"
A$=A$+"A 0,(18,180); M -120,0,180; A 1,(17,5)(16,5)(15,5)(14,5); M 0,0,20; Jump Snail;"
'
B$="A 0,(33,5); M 0,0,40;"
B$=B$+"Fish:A 1,(19,2)(20,6)(21,6); M 0,0,14; A 1,(22,50); M 0,-70,50 ; A 1,(23,6)(24,6)(25,6); M -5,-5,18; A 1,(26,6)(27,6); M -5,5,12;"
B$=B$+"A 1,(28,50); M 0,70,50; A 1,(29,1)(30,6)(31,6)(32,6); M 0,0,19; A 1,(33,20);M 10,0,20; Jump Fish;"
'
C$="A 1,(54,20); M 0,0,40;"
C$=C$+"Squirral:A 0,(54,10)(55,10); M 0,0,40; A 1,(56,8)(57,8)(58,8)(59,8); M 0,0,32; A 1,(59,5)(61,5)(62,5); M -3,0,15; A 0,(63,5)(64,5)(65,5)(66,5)(67,5); M -150,0,150"
C$=C$+"A 1,(62,5)(61,5)(59,5); M 0,0,15; A 0,(59,10)(60,10); M 0,0,40; A 1,(59,8)(58,8)(57,8)(56,8); M 0,0,32; A 1,(54,5)(68,5)(69,5); M 3,0,15; A 0,(70,5)(71,5)(72,5)(73,5)(74,5); M 150,0,150; A 1,(69,5)(68,5)(54,5); M 0,0,15; Jump Squirral;"
'
' Set the Channels to the strings then turn on the Amal animations.
Amal 1,A$ : Amal 2,B$ : Amal 3,C$
Amal On
'
End Proc
'
' Sets the positions for the first wave of items.
Procedure _ITEMS
'
Sprite 12,147,74,75
Sprite 13,180,150,78
Sprite 14,184,101,79
Sprite 15,145,185,76
Sprite 16,340,82,77
Sprite 17,360,175,78
Sprite 18,430,130,75
'
End Proc
'
' Sets the positions for the secound wave of items.
Procedure MORE_ITEMS
'
A=8 : Rem Sets number of items so the Mainloop only calls this procedure once.
Sprite 12,148,126,77
Sprite 13,255,163,75
Sprite 14,239,86,76
Sprite 15,370,82,79
Sprite 16,145,185,78
Sprite 17,200,185,77
Sprite 18,425,133,76
'
End Proc
'
' Updates your score and turns off a sprite when you collect an item.
Procedure _GET_ITEM
'
' Turns off the sprite you have collided with,plays the Collect sfx and
' updates the EXSC variable.
Sprite Off Col(-1) : Sam Bank 5 : Sam Play %1100,4 : A=A+1 : EXSC=EXSC+50
'
Screen 2
' Updates your score variable.
SC=SC+50
' Turn score variable to string so it can be printed using 'Text'.
C$=Str$(SC) : Text 144,20,C$
' Return to the relevant game screen.
If BONUS=1 Then Screen 0
If BONUS=0 Then Screen 1
'
End Proc
'
' Restarts the game after finishing the Bonus stage.
Procedure _RESTART
'
' Fades the bonus screen,turns off all sprites,bobs,Amal animations and hides screen.
Screen 1 : Fade 1 : Wait 15 : Sprite Off : Bob Off : Amal Off : Screen Hide 1
'
' Resets the A,BONUS,X,Y and N variables and turns on the enemy animations.