From cbfe3801bbcb2818b28b0c84e2bf6f25b123c46b Mon Sep 17 00:00:00 2001 From: rtk0c Date: Thu, 24 Apr 2025 13:14:10 -0700 Subject: Make the texture render --- src/sandbox.hpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/sandbox.hpp') diff --git a/src/sandbox.hpp b/src/sandbox.hpp index c6453c7..f65caaf 100644 --- a/src/sandbox.hpp +++ b/src/sandbox.hpp @@ -8,15 +8,20 @@ const int MBIT_DISPLACABLE = 1; struct Tile { - enum Material : unsigned char { + enum Solid : unsigned char { AIR = 0, - SOLID, + ROCK, SAND, + }; + + enum Fluid : unsigned char { + NOTHING = 0, WATER, }; - Material mat; - uint8_t pressure = 0; + Solid so = {}; + Fluid fl = {}; + uint8_t fmass = 0; bool updated = false; uint32_t get_color() const; @@ -26,8 +31,9 @@ struct Sandbox { std::vector _bitmap; std::vector _a; Pcg32 _pcg; - Tile _solid_tile; + Tile _wall_tile; int width, height; + int _x, _y; int ncycle = 0; Sandbox(int w, int h); -- cgit v1.2.3-70-g09d2