' If Henry touches a platform before N=34 then N=34 and exits out of loop.
If F=2 Then N=34
'
If Spritebob Col(8,1 To 3) Then N=34 : _DEAD
If I Sprite(10)<>58 and Sprite Col(8,10 To 10) Then N=34 : _DEAD
If I Sprite(12)<>58 and Sprite Col(8,12 To 12) Then N=34 : _DEAD
'
If I Bob(3)=48 Then Sam Bank 6 : Sam Play %1,1
If I Bob(1)=16 Then Sam Bank 6 : Sam Play %11,2
If I Sprite(10)=27 Then Sam Bank 6 : Sam Play %11,3
If X Sprite(12)=151 Then Sam Bank 6 : Sam Play %11,4
If GONG=0 Then Sam Bank 5 : Sam Play %1110,3 : GONG=80
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 15 To Sprite 8
Sprite 8,X,Y,
J$="A 0,(95,30)(96,10)(95,10)(96,10);"
Amal 15,J$ : Amal On 15 : 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 3) Then Update Off : _DEAD : Exit
If I Sprite(10)<>58 and Sprite Col(8,10 To 10) Then Update Off : _DEAD : Exit
If I Sprite(12)<>58 and Sprite Col(8,12 To 12) Then Update Off : _DEAD : Exit
'
If I Bob(3)=48 Then Sam Bank 6 : Sam Play %11,1
If I Bob(1)=16 Then Sam Bank 6 : Sam Play %11,2
If I Sprite(10)=27 Then Sam Bank 6 : Sam Play %11,3
If X Sprite(12)=151 Then Sam Bank 6 : Sam Play %11,4
If GONG=0 Then Sam Bank 5 : Sam Play %1110,3 : GONG=80
'
' 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 15 : Update Off : BLINK=0
'
' Update Bobs,swap screen then clear the bobs on screen to help stay in
' sync with the Main loop.
Bob Clear : Bob Draw : Screen Swap 0 : Wait Vbl : Bob Clear
'
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 Bob 1
Channel 2 To Sprite 10
Channel 3 To Bob 2
Channel 4 To Sprite 12
Channel 5 To Bob 3
Bob 1,304,116,13
Sprite 10,354,160,58
Bob 2,340,184,33
Sprite 12,150,96,45
Bob 3,160,82,46
'
' Set Amal animation strings for each enemy.
A$="Tank:A 0,(13,5)(14,5)(15,5); M -60,0,170; A 1,(13,5); M 0,0,10; A 1,(16,2)(17,5)(18,5)(13,5); M 0,0,17; A 1,(19,5)(20,5)(21,5)(22,5); M 0,0,20;"
A$=A$+"A 0,(23,5)(24,5)(25,5); M 60,0,170; A 1,(23,5); M 0,0,10; A 1,(22,5)(21,5)(20,5)(19,5)(13,5); M 0,0,25; Jump Tank"
'
B$="Bomb:A 0,(58,5); M 0,0,180; A 0,(26,5); M -25,-10,15; M -25,-5,15; M -25,5,15; M -25,10,15; M -25,15,15; A 1,(27,2)(28,5)(29,5)(30,5)(31,5)(32,5); M 0,0,27; A 0,(58,5); M 125,-15,5; M 0,0,135; Jump Bomb"
'
C$="Train:M 0,0,40; A 0,(33,5)(34,5)(35,5)(36,5); M-360,0,230; M 0,0,40; A 0,(37,5)(38,5)(39,5)(40,5); M 360,0,230; Jump Train"
'
D$="Cork:A 0,(45,5); M 0,0,55; M 1,0,1; A 0,(46,5); M 301,0,80; A 0,(58,5); M -302,0,5; Jump Cork"