Blocks atlas is auto-assembling now

This commit is contained in:
MihailRis
2023-11-22 01:53:48 +03:00
parent ea5c117652
commit fb8d220cca
41 changed files with 622 additions and 75 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
#include "Block.h"
Block::Block(std::string name, int texture) : name(name),
Block::Block(std::string name, std::string texture) : name(name),
textureFaces{texture,texture,texture,texture,texture,texture},
emission{0,0,0}{
}
+5 -3
View File
@@ -18,8 +18,8 @@ class Block {
public:
std::string const name;
unsigned int id;
// 0 1 2 3 4 5
int textureFaces[6]; // -x,x, -y,y, -z,z
// 0 1 2 3 4 5
std::string textureFaces[6]; // -x,x, -y,y, -z,z
unsigned char emission[3];
unsigned char drawGroup = 0;
BlockModel model = BlockModel::block;
@@ -31,7 +31,9 @@ public:
bool rotatable = false;
float hitboxScale = 1;
Block(std::string name, int texture);
float uvdata[4*6];
Block(std::string name, std::string texture);
};
#endif /* VOXELS_BLOCK_H_ */