
function CreateSprites()
	
	// Load images as sprites.

	LoadImage(1, "spaceship.png")
	CreateSprite(1, 1)
	
	LoadImage(2, "thrust.png")
	
	LoadImage(3, "shot_lg.png")
	CreateSprite(3, 3)
	
	LoadImage(4, "shot_sm.png")
	CreateSprite(4, 4)
	

	SetSpritePosition(1, 300, 300)
	SetSpriteOffset(1, 40, 35)

	// 
	SetSpritePosition(3, 100, 100)
	SetSpritePosition(4, 200, 200)
	
	
endfunction

function MoveSpaceship()
	// 
	// Check to make sure player is not beyond max velocity.  If not, then increate, otherwise stay the course.
	spaceShipXPos = spaceShipXPos + spaceShipXMov#
	spaceShipYPos = spaceShipYPos + spaceShipYMov#
	
	// 
	if spaceShipXPos > 1024 then spaceShipXPos = spaceShipXPos - 1024
	if spaceShipXPos < 0 then spaceShipXPos = spaceShipXPos + 1024
	
	if spaceShipYPos > 768 then spaceShipYPos = spaceShipYPos - 768
	if spaceShipYPos < 0 then spaceShipYPos = spaceShipYPos + 768
	
	SetSpritePosition(1, spaceShipXPos, spaceShipYPos)
endfunction

function MoveBullets()
	bulletXPos = bulletXPos + bulletXMov#
	bulletYPos = bulletYPos + bulletYMov#
	
	SetSpritePosition(3, bulletXPos, bulletYPos)
endfunction
