deep.js
// This function draws a shape in game space coordinates.

This function draws a shape in game space coordinates.
This function draws a shape in game space coordinates .
function Draw_Shape(x, y, rot, shape)
{
	var sc = ptos(x, y);
	var sc_ = stosc(shape);
	var sr_ = SRAD[shape] * Zoom_Fctr;
	var sv_ = SVERT[shape];
	var sa_ = 2 * Math.PI / sv_;
	context.save();
	context.lineJoin = "round";
	context.lineWidth = 3.0 * Zoom_Fctr;
	context.strokeStyle = Make_Color(_SB[sc_].r, _SB[sc_].g, _SB[sc_].b);
	context.fillStyle = Make_Color(_SF[sc_].r, _SF[sc_].g, _SF[sc_].b);
	context.translate(sc.x, sc.y);
	context.beginPath();
	context.moveTo(sr_ * Math.cos(0 + rot), sr_ * Math.sin(0 + rot));
	for (var i = 1; i <= sv_; i++) {
		context.lineTo(sr_ * Math.cos(i * sa_ + rot), sr_ * Math.sin(i * sa_ + rot));
	}
	context.closePath();
	context.fill();
	context.stroke();
	context.restore();
}
function Draw_Shape ( x , y , rot , shape ) { var sc = ptos ( x , y ) ; var sc_ = stosc ( shape ) ; var sr_ = SRAD [ shape ] * Zoom_Fctr ; var sv_ = SVERT [ shape ] ; var sa_ = 2 * Math . PI / sv_ ; context . save ( ) ; context . lineJoin = "round" ; context . lineWidth = 3.0 * Zoom_Fctr ; context . strokeStyle = Make_Color ( _SB [ sc_ ] . r , _SB [ sc_ ] . g , _SB [ sc_ ] . b ) ; context . fillStyle = Make_Color ( _SF [ sc_ ] . r , _SF [ sc_ ] . g , _SF [ sc_ ] . b ) ; context . translate ( sc . x , sc . y ) ; context . beginPath ( ) ; context . moveTo ( sr_ * Math . cos ( 0 + rot ) , sr_ * Math . sin ( 0 + rot ) ) ; for ( var i = 1 ; i <= sv_ ; i ++ ) { context . lineTo ( sr_ * Math . cos ( i * sa_ + rot ) , sr_ * Math . sin ( i * sa_ + rot ) ) ; } context . closePath ( ) ; context . fill ( ) ; context . stroke ( ) ; context . restore ( ) ; }
This function draws a shape in game space coordinates.
This function draws a shape in game space coordinates .