' 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 12) Then N=34 : _DEAD
If Spritebob Col(8,1 To 4) Then N=34 : _DEAD
If Spritebob Col(8,5 To 5) Then N=34 : _BONUS
'
If Bob Col(1,2 To 2)=-1 Then Sam Bank 6 : Sam Play %1,2
If I Sprite(12)=42 Then Sam Bank 6 : Sam Play %10,1
If GONG=0 Then Sam Bank 5 : Sam Play %1110,3 : GONG=70
If BONUS=0
If I Bob(6)=50 or I Bob(7)=50 or I Bob(8)=50 or I Bob(9)=50 or I Bob(10)=50 : Sam Bank 6 : Sam Play %11,1 : End If
If Spritebob Col(8,6 To 10) : N=34 : _BDEAD : End If
End If
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 13 To Sprite 8
Sprite 8,X,Y,
M$="A 0,(66,30)(67,10)(66,10)(67,10);"
Amal 13,M$ : Amal On 13 : 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 4) Then Update Off : _DEAD : Exit
If Sprite Col(8,10 To 12) Then Update Off : _DEAD : Exit
'
If Bob Col(1,2 To 2)=-1 Then Sam Bank 6 : Sam Play %1,2
If I Sprite(12)=42 Then Sam Bank 6 : Sam Play %10,1
If GONG=0 Then Sam Bank 5 : Sam Play %1110,3 : GONG=70
If BONUS=0
If I Bob(6)=50 or I Bob(7)=50 or I Bob(8)=50 or I Bob(9)=50 or I Bob(10)=50 : Sam Bank 6 : Sam Play %11,1 : End If
If Spritebob Col(8,6 To 10) : Update Off : _BDEAD : Exit : 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 reset the BLINK timer.
Amal Off 13 : Update Off : BLINK=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
Channel 4 To Bob 3
Channel 5 To Sprite 12
Channel 6 To Bob 4
Sprite 10,186,156,13
Bob 1,272,140,22
Bob 2,272,144,19
Bob 3,140,15,23
Sprite 12,254,74,40
Bob 4,340,188,62
'
' Set Amal animation strings for each enemy.
A$="A 0,(45,5); M 0,0,40;"
A$=A$+"Flame:A 1,(13,5)(14,5)(15,5)(16,5)(17,5)(18,5)(17,5)(16,5)(15,5)(14,5)(13,5); M 0,0,55; A 1,(45,10); M 30,0,10;"
A$=A$+"A 1,(13,5)(14,5)(15,5)(16,5)(17,5)(18,5)(17,5)(16,5)(15,5)(14,5)(13,5); M 0,0,55; A 1,(45,10); M -30,0,10 Jump Flame"
'
B$="A 0,(19,40); M 0,0,40;"
B$=B$+"A 0,(19,10)(20,10)(21,40);"
'
C$="A 0,(45,5); M 0,0,40;"
C$=C$+"Bread:A 1,(22,50); M 0,-160,50; A 1,(45,10); M 0,160,10; Jump Bread"
'
D$="A 0,(23,40); M 0,0,40;"
D$=D$+"Teapot:A 1,(23,5)(24,5)(25,10)(24,5)(23,5) ; M 0,0,30; A 1,(26,5)(27,5)(28,5)(29,5); M 0,0,20; A 0,(29,5)(30,5)(31,5)(32,5)(33,5); M 65,0,100"
D$=D$+"A 1,(29,5)(34,5)(35,10)(34,5)(29,5); M 0,0,30; A 1,(29,5)(28,5)(27,5)(26,5); M 0,0,20; A 0,(23,5)(36,5)(37,5)(38,5)(39,5); M -65,0,100 Jump Teapot"
'
E$="A 0,(45,40); M 0,0,40;"
E$=E$+"Drop:A 1,(45,10); M 0,0,10;A 0,(40,5)(41,30);M 0,80,35; A 1,(42,2)(43,5)(44,5); M 0,0,15; A 1,(45,100); M 0,-80,50; M 92,0,50;"
E$=E$+"A 0,(40,5)(41,35); M 0,101,40; A 1,(42,2)(43,5)(44,5); M 0,0,15;A 1,(45,85); M 0,-101,40; M -92,0,45 Jump Drop"
'
F$="A 0,(62,40); M 0,0,40;"
F$=F$+"Fork:A 0,(62,5); M -350,0,200; M 0,0,50; A 0,(63,5); M 350,0,200; M 0,0,50; Jump Fork"
'
' Set the Channels to the strings then turn on the Amal animations.
Amal 1,A$ : Amal 2,C$ : Amal 3,B$ : Amal 4,D$ : Amal 5,E$ : Amal 6,F$
Amal On
'
End Proc
'
' Sets the positions for the first wave of items.
Procedure _ITEMS
'
Sprite 13,140,69,53
Sprite 14,258,112,55
Sprite 15,148,173,54
Sprite 16,430,235,56
Sprite 17,388,90,54
Sprite 18,170,235,55
Sprite 19,200,138,56
'
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 13,195,96,56
Sprite 14,358,174,55
Sprite 15,300,70,57
Sprite 16,433,142,54
Sprite 17,342,114,53
Sprite 18,434,224,56
Sprite 19,200,224,53
'
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 and Y variables,turns on the enemy animations then
' pastes the 'closed fridge door' image on screen.