summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLizzy Fleckenstein <lizzy@vlhl.dev>2024-01-09 22:02:38 +0100
committerLizzy Fleckenstein <lizzy@vlhl.dev>2024-01-09 22:02:38 +0100
commit0d0f738b3adc40de827ada9083404e9f9e065e2b (patch)
tree77d5dd3fe6f634cff26a8991d56907eb0aec213b
parent31a19a1f6b02fe5638c877868be1ff26b5e44abe (diff)
downloadcuddles-0d0f738b3adc40de827ada9083404e9f9e065e2b.tar.xz
make cheese spin faster
-rw-r--r--stage3/cheese_demo.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/stage3/cheese_demo.c b/stage3/cheese_demo.c
index efbd728..cb0b5ed 100644
--- a/stage3/cheese_demo.c
+++ b/stage3/cheese_demo.c
@@ -140,14 +140,15 @@ void cheese_demo()
cheese ch = make_cheese_model(8, rad(60), 500, 375);
float angle = 0;
- u64 time = clock_monotonic();
+ u64 last_frame = clock_monotonic();
for (;;) {
- u64 time1 = clock_monotonic();
- float delta = (time1 - time) / (float)(NANOSECONDS);
- time = time1;
+ u64 now = clock_monotonic();
- angle += delta * 90;
+ float delta = (now - last_frame) / (float)(NANOSECONDS);
+ last_frame = now;
+
+ angle += delta * 120;
float transform[4][4];
float tmp[4][4];