diff --git a/src/inc/block.hpp b/src/inc/block.hpp index 65a6ad9..a850592 100644 --- a/src/inc/block.hpp +++ b/src/inc/block.hpp @@ -127,6 +127,8 @@ enum block_id id_reeds, + id_crafting_table, + id_null }; diff --git a/src/inc/face.hpp b/src/inc/face.hpp index f27684e..573ea3c 100644 --- a/src/inc/face.hpp +++ b/src/inc/face.hpp @@ -58,6 +58,15 @@ face_info* make_face_info_caps(float top, float bottom, float side) return new face_info(top, bottom, side, side, side, side); } +// Generates a face_info* that uses side_1 for the front and back faces, +// side_2 for the left and right faces, uses bottom for the bottom face, and +// top for the top face. + +face_info* make_face_info_bench(float top, float bottom, float side_1, float side_2) +{ + return new face_info(top, bottom, side_2, side_2, side_1, side_1); +} + // This function fills up block_face_info with a face_info* object for each // block_id. Call this function after calling load_block_texture_array, // because this function uses block_name_to_layer as a lookup table. @@ -188,6 +197,8 @@ void load_block_face_info_array() make_face_info_all(block_name_to_layer.at("brick")), - make_face_info_all(block_name_to_layer.at("reeds")) + make_face_info_all(block_name_to_layer.at("reeds")), + + make_face_info_bench(block_name_to_layer.at("crafting_table_top"), block_name_to_layer.at("oak_planks"), block_name_to_layer.at("crafting_table_front"), block_name_to_layer.at("crafting_table_side")) }; } \ No newline at end of file diff --git a/src/inc/image.hpp b/src/inc/image.hpp index 6b8a157..24374f2 100644 --- a/src/inc/image.hpp +++ b/src/inc/image.hpp @@ -25,6 +25,12 @@ std::vector all_tex = "cobblestone", + "crafting_table_front", + + "crafting_table_side", + + "crafting_table_top", + "dandelion", "diamond_ore", diff --git a/tex/crafting_table_front.png b/tex/crafting_table_front.png new file mode 100755 index 0000000..11986a4 Binary files /dev/null and b/tex/crafting_table_front.png differ diff --git a/tex/crafting_table_side.png b/tex/crafting_table_side.png new file mode 100755 index 0000000..1c678b4 Binary files /dev/null and b/tex/crafting_table_side.png differ diff --git a/tex/crafting_table_top.png b/tex/crafting_table_top.png new file mode 100755 index 0000000..5cd53a5 Binary files /dev/null and b/tex/crafting_table_top.png differ