diff --git a/src/inc/block.hpp b/src/inc/block.hpp index 1eae247..8146826 100644 --- a/src/inc/block.hpp +++ b/src/inc/block.hpp @@ -91,6 +91,8 @@ enum block_id id_black_wool, + id_glass, + id_null }; @@ -108,6 +110,8 @@ inline bool is_transparent(block_id id) id == id_water || + id == id_glass || + id == id_null ) { @@ -205,7 +209,9 @@ std::vector block_id_to_string = "red_wool", - "black_wool" + "black_wool", + + "glass", }; // Conversion from block_id to std::string (used for in-game text). @@ -296,5 +302,7 @@ std::vector block_id_to_block_name = "Red Wool", - "Black Wool" + "Black Wool", + + "Glass" }; \ No newline at end of file diff --git a/src/inc/face.hpp b/src/inc/face.hpp index c7e8d4d..177ce75 100644 --- a/src/inc/face.hpp +++ b/src/inc/face.hpp @@ -152,6 +152,8 @@ void load_block_face_info_array() make_face_info_all(block_name_to_layer.at("wool_colored_red")), - make_face_info_all(block_name_to_layer.at("wool_colored_black")) + make_face_info_all(block_name_to_layer.at("wool_colored_black")), + + make_face_info_all(block_name_to_layer.at("glass")) }; } \ No newline at end of file diff --git a/src/inc/image.hpp b/src/inc/image.hpp index 09e1c92..b93e2b6 100644 --- a/src/inc/image.hpp +++ b/src/inc/image.hpp @@ -29,6 +29,8 @@ std::vector all_tex = "emerald_ore", + "glass", + "gold_ore", "grass_side", diff --git a/src/inc/mesh.hpp b/src/inc/mesh.hpp index 6092a0c..c68ac05 100644 --- a/src/inc/mesh.hpp +++ b/src/inc/mesh.hpp @@ -8,6 +8,10 @@ inline bool hide_face(block_id face, block_id neighbor) { hide = false; } + else if (face == id_glass && neighbor == id_glass) + { + hide = false; + } return hide; } diff --git a/tex/glass.png b/tex/glass.png new file mode 100755 index 0000000..acadb01 Binary files /dev/null and b/tex/glass.png differ