arbitrary config.h update and proper compensation for framerate in gravity acceleration

This commit is contained in:
Ole Morud
2022-06-08 18:50:10 +02:00
parent ecd1d2469e
commit b5b822d5ad
2 changed files with 10 additions and 10 deletions

View File

@@ -56,19 +56,19 @@ int main(){
// Add 4 points, link them, and add points and links to respective arrays
Point a = { 10.0, 10.0,
11.0, 10.0,
0.0, GRAVITY/FRAMERATE};
0.0, GRAVITY/(FRAMERATE*FRAMERATE)};
Point b = { 20.0, 10.0,
20.0, 10.0,
0.0, GRAVITY/FRAMERATE};
0.0, GRAVITY/(FRAMERATE*FRAMERATE)};
Point c = { 20.0, 20.0,
19.0, 20.0,
0.0, GRAVITY/FRAMERATE};
0.0, GRAVITY/(FRAMERATE*FRAMERATE)};
Point d = { 10.0, 20.0,
10.0, 20.0,
0.0, GRAVITY/FRAMERATE};
0.0, GRAVITY/(FRAMERATE*FRAMERATE)};
Link *l_ab = link_points(&a, &b);
Link *l_bc = link_points(&b, &c);
@@ -83,7 +83,7 @@ int main(){
while(1){
// clear canvas, calculate next frame and draw
memset(cnv.data, '.', cnv.x * cnv.y);
memset(cnv.data, OFF, cnv.x * cnv.y);
for(int i=0; i<6; i++)