From 5264e113c312dae0e4b31fbd6391c5062e9f8ac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Madar=C3=A1sz?= Date: Mon, 14 Aug 2023 19:40:20 +0200 Subject: [PATCH] new ver --- demos/02-ddraw.c | 8 +++++--- demos/04-actor.c | 2 +- engine/v4k.html | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/demos/02-ddraw.c b/demos/02-ddraw.c index 1b1e9dd..51c6064 100644 --- a/demos/02-ddraw.c +++ b/demos/02-ddraw.c @@ -1,4 +1,4 @@ -// ddraw demo: fps camera, renderdd, collide, math, ui, fx +// ddraw demo: fps camera, renderdd, collide, math, ui, fx, boids // - rlyeh, public domain. // // Compile with: @@ -8,8 +8,9 @@ #include "v4k.h" int main() { + bool do_boids_demo = 1; bool do_colliders_demo = 1; - bool do_debugdraw_demo = 0; + bool do_debugdraw_demo = 1; // 75% size, MSAAx2 window_create(75.0, WINDOW_MSAA2); @@ -60,7 +61,7 @@ int main() { // boids static swarm_t sw; - profile("boids") { + if( do_boids_demo ) profile("boids") { do_once sw = swarm(); do_once array_push(sw.steering_targets, vec3(0,0,0)); do_once for(int i = 0; i < 100; ++i) @@ -91,6 +92,7 @@ int main() { // ui if( ui_panel("App", 0) ) { + ui_bool("Boids demo", &do_boids_demo); ui_bool("Collide demo", &do_colliders_demo); ui_bool("DebugDraw demo", &do_debugdraw_demo); ui_panel_end(); diff --git a/demos/04-actor.c b/demos/04-actor.c index d9046d2..aebf5c6 100644 --- a/demos/04-actor.c +++ b/demos/04-actor.c @@ -91,7 +91,7 @@ int main() { array_pop_front(points); } else { - if( dist < 10 && abs(angle) > 10 ) { + if( dist < 10 && fabsf(angle) > 10 ) { // spin only p->brain[ angle < 0 ? 2 : 3 ] = 1; } diff --git a/engine/v4k.html b/engine/v4k.html index eeb9f3a..8575b04 100644 --- a/engine/v4k.html +++ b/engine/v4k.html @@ -596,7 +596,7 @@ details > summary::-webkit-details-marker { |Version: | 2023.7 | |:--------------|:------------| |Branch: | main | -|Commit: | 36 | +|Commit: | 45 | # [V·4·K 2023.7 ](https://dev.v4.games/zaklaus/v4k)