summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xd.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/xd.c b/xd.c
index 2e54639..f2502e0 100644
--- a/xd.c
+++ b/xd.c
@@ -3950,15 +3950,8 @@ static void GravityDemo(void)
a = (a + 900) % 3600;
- gravobj[f].dx = sintab[a] * 10;
- gravobj[f].dy = costab[a] * 10;
-
- /*
- gravobj[f].x = RND(width);
- gravobj[f].y = RND(height);
- gravobj[f].dx = (double)RND(10)/10.0;
- gravobj[f].dy = (double)RND(10)/10.0;
- */
+ gravobj[f].dx = sintab[a] * 0.1;
+ gravobj[f].dy = costab[a] * 0.1;
gravobj[f].mass = 1;
}
@@ -4003,7 +3996,7 @@ static void GravityDemo(void)
g = 1.0 / d*d;
- g /= 100.0;
+ g /= 10000.0;
g *= gravobj[f].mass;
dx /= d;
@@ -4020,8 +4013,8 @@ static void GravityDemo(void)
for(f = 0; f < GRAV_OBJ; f++)
{
- gravobj[f].x += gravobj[f].dx / 50.0;
- gravobj[f].y += gravobj[f].dy / 50.0;
+ gravobj[f].x += gravobj[f].dx;
+ gravobj[f].y += gravobj[f].dy;
for(r = GRAV_TRAIL - 1; r > 0; r--)
{