-- movePlayer moves the player sprite around
function movePlayer()
 	local iX = 0
	local iY = 0

	local minY = 130 - (player.img:height()/2)
	local maxY = 270 - (player.img:height())
	
	local minX = (player.img:width()/2) - 20 -- FIXME: STUPID SOLUTION!!!
	local maxX = 460 - (player.img:width()/2) -- FIXME: STUPID SOLUTION!!!
	
	if pad:left() and player.x > minX then
		player.img = player3
		iX = -2
 	elseif pad:right() and player.x < maxX then
		player.img = player1
		iX = 2
	else
	    iX = 0
	end

	-- Up arrow
	if pad:up() and player.y > minY then
		player.img = player3
		iY = -2
 	elseif pad:down() and player.y < maxY then
		player.img = player4
		iY = 2
	else
	    iY = 0
	end

	player.x = player.x + iX
	player.y = player.y + iY

	-- TODO:
	-- - up-right
	-- - up-left
	-- - down-right
	-- - down-left
	-- - Action buttons...
end