Minor refactor

This commit is contained in:
MihailRis
2023-11-15 13:38:42 +03:00
parent aa88fcd7f9
commit be980b2aa6
7 changed files with 21 additions and 17 deletions
+5 -4
View File
@@ -1,9 +1,6 @@
#ifndef VOXELS_BLOCK_H_
#define VOXELS_BLOCK_H_
#define BLOCK_MODEL_CUBE 1
#define BLOCK_MODEL_X_SPRITE 2
#define FACE_MX 0
#define FACE_PX 1
#define FACE_MY 2
@@ -11,6 +8,10 @@
#define FACE_MZ 4
#define FACE_PZ 5
enum class BlockModel {
none, block, xsprite
};
class Block {
public:
static Block* blocks[256];
@@ -20,7 +21,7 @@ public:
int textureFaces[6]; // -x,x, -y,y, -z,z
unsigned char emission[3];
unsigned char drawGroup = 0;
unsigned char model = 1; // 0:None 1:Block 2:XSprite
BlockModel model = BlockModel::block;
bool lightPassing = false;
bool skyLightPassing = false;
bool obstacle = true;