To draw a circle you'll need to use sine and cosine
PHP Code:
temp.circle = NULL;
for ( temp.a = 0; temp.a < ( 2 * pi); temp.a += ( pi / 32);)
{
temp.circle.add( player.x + 5 * cos( temp.a));
temp.circle.add( player.y - 5 * sin( temp.a));
}
showPoly( 1, temp.circle);
Basically adjust the 32 is the number of sides in the circle. It's not a true circle, but visually it's pretty close, increase it for a smoother edges, but costs for cpu time.
To get a a circle on a quadrant plane you use
X = ORGINX + RADIUS * cos( ANGLE);
Y = ORGINY - RADIUS * sin( ANGLE);
Orgins are the center x/y points of the circle
Radius is the number of tiles for the center point
Angle is the well the angle from the center that we are drawing
As for moving along angles, it involves sine and cosine again.
PHP Code:
temp.angle = getangle( vecx( player.dir), vecy( player.dir));
player.x += cos( temp.angle) * 0.5;
player.y += -sin( temp.angle) * 0.5;
Basically getangle() works by getting values and computing its angle
So it gets values in vectors. Grall operates as so, East is 0/360 degrees and north is 90 degress and so forth.