' The number of enemy ships. Increasing this may slow
' performance.
Const NUM_ENEMY_SHIPS = 3
Dim ScrollSpeed As Integer ' The ship's current turning speed
Dim LaserFired As Integer ' Has the player fired the laser?
Dim ShipsDestroyed As Integer ' Total enemy ships destroyed.
' Mouse position relative to large background bitmap
Dim MouseX As Long, MouseY As Long
' WaveMix sound handles used for creating the game's
' layered sound effects.
Dim WAV_Turn As Integer
Dim WAV_LaserHit As Integer
Dim WAV_LaserMiss As Integer
Dim WAV_Music As Integer
Dim WAV_ShieldHit As Integer
Dim WAV_Alert As Integer
' The normal enemy ships.
Dim Ship(1 To 4) As tShip
' The enemy ships when firing.
Dim ShipFiringSprite As tSprite
' The enemy ships when exploding (one sprite per frame).
Dim ExplosionSprite(0 To 2) As tSprite
' Used by the picSpeed speed indicator.
Dim TotalBlocks As Integer
' RGB color constants used for laser fire.
Const RED = &HFF
Const GREEN = &HFF00&
' Windows API calls
Private Declare Function GetPixel Lib "GDI" (ByVal hDC As Integer, ByVal X As Integer, ByVal Y As Integer) As Long
Private Declare Function setpixel Lib "GDI" (ByVal hDC As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal crColor As Long) As Long
Private Declare Function ellipse Lib "GDI" (ByVal hDC As Integer, ByVal nLeft As Integer, ByVal nTop As Integer, ByVal nRight As Integer, ByVal nBottom As Integer) As Long
Private Declare Function LineTo Lib "GDI" (ByVal hDC As Integer, ByVal X As Integer, ByVal Y As Integer) As Integer
Private Declare Function Polyline Lib "GDI" (ByVal hDC As Integer, lpPoints As POINTAPI, ByVal nCount As Integer) As Integer
Private Declare Function MoveTo Lib "GDI" (ByVal hDC As Integer, ByVal X As Integer, ByVal Y As Integer) As Long