commit d2350f18e7ca5a310a4d844942a03dd987dc9e37
parent c1e9c1b2de5baf65430b02e3da6022b64af47d6e
Author: ssnf <ssnf@ssnf.xyz>
Date: Wed, 18 May 2022 13:48:11 +0000
Remove compiler optimizations to improve debugging. Better fr_calc() placement
Diffstat:
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
@@ -1,5 +1,5 @@
CC = c89
-CFLAGS = -Os -g -Wall -Wpedantic -Wno-deprecated-declarations -Wno-return-type
+CFLAGS = -O0 -g -Wall -Wpedantic -Wno-deprecated-declarations -Wno-return-type
SRC = ${wildcard *.c}
OBJ = ${SRC:.c=.o}
diff --git a/sim.c b/sim.c
@@ -718,7 +718,6 @@ move(int arg)
f->dot.p1 = fr->a[fr->dot - 1].p0;
else
f->dot.p1 = 0;
- fr_calc(fr);
break;
case Down:
if (!f->s->n)
@@ -727,14 +726,12 @@ move(int arg)
f->dot.p1 = fr->a[fr->dot + 1].p0;
else
f->dot.p1 = fr->a[fr->dot].p1 - 1;
- fr_calc(fr);
break;
case HalfUp:
if (fr->dot < w.wy/2)
f->dot.p1 = 0;
else
f->dot.p1 = fr->a[fr->dot - w.wy/2].p0;
- fr_calc(fr);
break;
case HalfDown:
if (!f->s->n)
@@ -746,7 +743,6 @@ move(int arg)
f->dot.p1 = f->s->n;
} else
f->dot.p1 = fr->a[fr->dot + w.wy/2].p0;
- fr_calc(fr);
break;
case Top:
f->dot.p1 = 0;
@@ -782,6 +778,7 @@ move(int arg)
break;
};
f->dot.p0 = f->dot.p1;
+ fr_calc(fr);
}
static void