From 0a5d5fc87cc452e9c82ff8ef91662686f9ffe283 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Fri, 25 Aug 2023 22:54:10 +0100 Subject: ~modified step,~state data is now unsigned 64 bit integer Stopped adding a grain of sand per step. Collapsing should work properly for any amount of sand grains, regardless of whether it's 4 or 4000. Previous code fixed it at 4 always, and how it distributed was so as well. Now we distribute as much sand as we can. This comes from the idea that, instead of incrementing while rendering, let's just set some n pixels in the centre and see how the model distributes them. --- lib.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib.h') diff --git a/lib.h b/lib.h index bebc1df..1831f5e 100644 --- a/lib.h +++ b/lib.h @@ -2,12 +2,13 @@ #define LIB_H #include +#include #include typedef struct State { // Sandpiles - unsigned char *data; + uint64_t *data; size_t dwidth; size_t window_len; -- cgit v1.2.3-13-gbd6f