aboutsummaryrefslogtreecommitdiff
path: root/src/sandbox.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sandbox.hpp')
-rw-r--r--src/sandbox.hpp16
1 files changed, 11 insertions, 5 deletions
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<uint32_t> _bitmap;
std::vector<Tile> _a;
Pcg32 _pcg;
- Tile _solid_tile;
+ Tile _wall_tile;
int width, height;
+ int _x, _y;
int ncycle = 0;
Sandbox(int w, int h);