function initDisplay(ctx){
	ctx.clearRect(0,0,300,350);
	ctx.save();
	ctx.scale(1, -1);
	ctx.translate(0, -350);
}

function tmpDraw(ctx){
	ctx.fillRect(myWorld.dynObj[0].x, myWorld.dynObj[0].y, myWorld.dynObj[0].width, myWorld.dynObj[0].height);
}

function drawWorld(ctx, curWorld){
	for (var i = 0; i < curWorld.dynObj.length; i++){
		drawObject(ctx, curWorld.dynObj[i], i);
	}
	for (var i = 0; i < curWorld.statObj.length; i++){
		drawObject(ctx, curWorld.statObj[i], i);
	}
}

function drawObject(ctx, shape, i){
	ctx.fillStyle = shape.colour;
	//ctx.fillStyle = "rgb(0, " + (255 - (i * 40)) + ", 0)";
	switch (shape.type){
		case "rect":
			ctx.fillRect(shape.x, shape.y, shape.width, shape.height);
			break;
		case "circle":
			ctx.beginPath();
			ctx.arc(shape.x, shape.y, shape.radius, 0, 2 * Math.PI, true);
			ctx.fill();
			break;
	}
}

function closeDisplay(ctx){
	ctx.restore();
}
