door textures mk2(?)
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 179 B |
Before Width: | Height: | Size: 179 B |
Before Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 225 B After Width: | Height: | Size: 225 B |
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 225 B |
Before Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 163 B After Width: | Height: | Size: 163 B |
Before Width: | Height: | Size: 173 B After Width: | Height: | Size: 173 B |
Before Width: | Height: | Size: 173 B |
Before Width: | Height: | Size: 163 B |
Before Width: | Height: | Size: 163 B |
Before Width: | Height: | Size: 163 B After Width: | Height: | Size: 163 B |
Before Width: | Height: | Size: 209 B After Width: | Height: | Size: 209 B |
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 209 B |
Before Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 167 B |
|
@ -1320,7 +1320,7 @@ void content_mapnode_init()
|
|||
f->draw_type = CDT_PLANTLIKE;
|
||||
f->setAllTextures("sapling.png");
|
||||
f->setInventoryTexture("sapling.png");
|
||||
f->used_texturenames["sapling.png"] = true;
|
||||
f->setAllTextureFlags(0);
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->light_propagates = true;
|
||||
f->air_equivalent = false;
|
||||
|
@ -1715,8 +1715,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Wood Door");
|
||||
f->setAllTextures("door_wood_lb.png");
|
||||
f->setInventoryTexture("door_wood_l_inv.png");
|
||||
f->setAllTextures("door_wood_b.png");
|
||||
f->setTexture(4,"door_wood_b.png[transformFX");
|
||||
f->setInventoryTexture("door_wood_inv.png");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -1727,8 +1728,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Wood Door");
|
||||
f->setAllTextures("door_wood_lt.png");
|
||||
f->setInventoryTexture("door_wood_l_inv.png");
|
||||
f->setAllTextures("door_wood_t.png");
|
||||
f->setTexture(4,"door_wood_t.png[transformFX");
|
||||
f->setInventoryTexture("door_wood_inv.png");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -1740,8 +1742,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Steel Door");
|
||||
f->setAllTextures("door_steel_lb.png");
|
||||
f->setInventoryTexture("door_steel_l_inv.png");
|
||||
f->setAllTextures("door_steel_b.png");
|
||||
f->setTexture(4,"door_steel_b.png[transformFX");
|
||||
f->setInventoryTexture("door_steel_inv.png");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -1754,8 +1757,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Steel Door");
|
||||
f->setAllTextures("door_steel_lt.png");
|
||||
f->setInventoryTexture("door_steel_l_inv.png");
|
||||
f->setAllTextures("door_steel_t.png");
|
||||
f->setTexture(4,"door_steel_t.png[transformFX");
|
||||
f->setInventoryTexture("door_steel_inv.png");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -1769,8 +1773,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Wood Windowed Door");
|
||||
f->setAllTextures("door_wood_wlb.png");
|
||||
f->setInventoryTexture("door_wood_wl_inv.png");
|
||||
f->setAllTextures("door_wood_wb.png");
|
||||
f->setTexture(4,"door_wood_wb.png[transformFX");
|
||||
f->setInventoryTexture("door_wood_w_inv.png");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -1781,8 +1786,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Wood Windowed Door");
|
||||
f->setAllTextures("door_wood_wlt.png");
|
||||
f->setInventoryTexture("door_wood_wl_inv.png");
|
||||
f->setAllTextures("door_wood_wt.png");
|
||||
f->setTexture(4,"door_wood_wt.png[transformFX");
|
||||
f->setInventoryTexture("door_wood_w_inv.png");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -1794,8 +1800,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Steel Windowed Door");
|
||||
f->setAllTextures("door_steel_wlb.png");
|
||||
f->setInventoryTexture("door_steel_wl_inv.png");
|
||||
f->setAllTextures("door_steel_wb.png");
|
||||
f->setTexture(4,"door_steel_wb.png[transformFX");
|
||||
f->setInventoryTexture("door_steel_w_inv.png");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -1808,8 +1815,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Steel Windowed Door");
|
||||
f->setAllTextures("door_steel_wlt.png");
|
||||
f->setInventoryTexture("door_steel_wl_inv.png");
|
||||
f->setAllTextures("door_steel_wt.png");
|
||||
f->setTexture(4,"door_steel_wt.png[transformFX");
|
||||
f->setInventoryTexture("door_steel_w_inv.png");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -1824,8 +1832,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Right Hanging Wood Door");
|
||||
f->setAllTextures("door_wood_rb.png");
|
||||
f->setInventoryTexture("door_wood_r_inv.png");
|
||||
f->setAllTextures("door_wood_b.png[transformFX");
|
||||
f->setTexture(4,"door_wood_b.png");
|
||||
f->setInventoryTexture("door_wood_inv.png[transformFX");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -1836,8 +1845,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Right Hanging Wood Door");
|
||||
f->setAllTextures("door_wood_rt.png");
|
||||
f->setInventoryTexture("door_wood_r_inv.png");
|
||||
f->setAllTextures("door_wood_t.png[transformFX");
|
||||
f->setTexture(4,"door_wood_t.png");
|
||||
f->setInventoryTexture("door_wood_inv.png[transformFX");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -1849,8 +1859,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Right Hanging Steel Door");
|
||||
f->setAllTextures("door_steel_rb.png");
|
||||
f->setInventoryTexture("door_steel_r_inv.png");
|
||||
f->setAllTextures("door_steel_b.png[transformFX");
|
||||
f->setTexture(4,"door_steel_b.png");
|
||||
f->setInventoryTexture("door_steel_inv.png[transformFX");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -1863,8 +1874,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Right Hanging Steel Door");
|
||||
f->setAllTextures("door_steel_rt.png");
|
||||
f->setInventoryTexture("door_steel_r_inv.png");
|
||||
f->setAllTextures("door_steel_t.png[transformFX");
|
||||
f->setTexture(4,"door_steel_t.png");
|
||||
f->setInventoryTexture("door_steel_inv.png[transformFX");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -1878,8 +1890,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Right Hanging Wood Windowed Door");
|
||||
f->setAllTextures("door_wood_wrb.png");
|
||||
f->setInventoryTexture("door_wood_wr_inv.png");
|
||||
f->setAllTextures("door_wood_wb.png[transformFX");
|
||||
f->setTexture(4,"door_wood_wb.png");
|
||||
f->setInventoryTexture("door_wood_w_inv.png[transformFX");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -1890,8 +1903,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Right Hanging Wood Windowed Door");
|
||||
f->setAllTextures("door_wood_wrt.png");
|
||||
f->setInventoryTexture("door_wood_wr_inv.png");
|
||||
f->setAllTextures("door_wood_wt.png[transformFX");
|
||||
f->setTexture(4,"door_wood_wt.png");
|
||||
f->setInventoryTexture("door_wood_w_inv.png[transformFX");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -1903,8 +1917,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Right Hanging Steel Windowed Door");
|
||||
f->setAllTextures("door_steel_wrb.png");
|
||||
f->setInventoryTexture("door_steel_wr_inv.png");
|
||||
f->setAllTextures("door_steel_wb.png[transformFX");
|
||||
f->setTexture(4,"door_steel_wb.png");
|
||||
f->setInventoryTexture("door_steel_w_inv.png[transformFX");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -1917,8 +1932,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Right Hanging Steel Windowed Door");
|
||||
f->setAllTextures("door_steel_wrt.png");
|
||||
f->setInventoryTexture("door_steel_wr_inv.png");
|
||||
f->setAllTextures("door_steel_wt.png[transformFX");
|
||||
f->setTexture(4,"door_steel_wt.png");
|
||||
f->setInventoryTexture("door_steel_w_inv.png[transformFX");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -1933,8 +1949,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Wood Door");
|
||||
f->setAllTextures("door_wood_lb.png");
|
||||
f->setInventoryTexture("door_wood_l_inv.png");
|
||||
f->setAllTextures("door_wood_b.png");
|
||||
f->setTexture(4,"door_wood_b.png[transformFX");
|
||||
f->setInventoryTexture("door_wood_inv.png");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -1945,8 +1962,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Wood Door");
|
||||
f->setAllTextures("door_wood_lt.png");
|
||||
f->setInventoryTexture("door_wood_l_inv.png");
|
||||
f->setAllTextures("door_wood_t.png");
|
||||
f->setTexture(4,"door_wood_t.png[transformFX");
|
||||
f->setInventoryTexture("door_wood_inv.png");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -1958,8 +1976,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Steel Door");
|
||||
f->setAllTextures("door_steel_lb.png");
|
||||
f->setInventoryTexture("door_steel_l_inv.png");
|
||||
f->setAllTextures("door_steel_b.png");
|
||||
f->setTexture(4,"door_steel_b.png[transformFX");
|
||||
f->setInventoryTexture("door_steel_inv.png");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -1972,8 +1991,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Steel Door");
|
||||
f->setAllTextures("door_steel_lt.png");
|
||||
f->setInventoryTexture("door_steel_l_inv.png");
|
||||
f->setAllTextures("door_steel_t.png");
|
||||
f->setTexture(4,"door_steel_t.png[transformFX");
|
||||
f->setInventoryTexture("door_steel_inv.png");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -1987,8 +2007,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Wood Windowed Door");
|
||||
f->setAllTextures("door_wood_wlb.png");
|
||||
f->setInventoryTexture("door_wood_wl_inv.png");
|
||||
f->setAllTextures("door_wood_wb.png");
|
||||
f->setTexture(4,"door_wood_wb.png[transformFX");
|
||||
f->setInventoryTexture("door_wood_w_inv.png");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -1999,8 +2020,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Wood Windowed Door");
|
||||
f->setAllTextures("door_wood_wlt.png");
|
||||
f->setInventoryTexture("door_wood_wl_inv.png");
|
||||
f->setAllTextures("door_wood_wt.png");
|
||||
f->setTexture(4,"door_wood_wt.png[transformFX");
|
||||
f->setInventoryTexture("door_wood_w_inv.png");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -2012,8 +2034,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Steel Windowed Door");
|
||||
f->setAllTextures("door_steel_wlb.png");
|
||||
f->setInventoryTexture("door_steel_wl_inv.png");
|
||||
f->setAllTextures("door_steel_wb.png");
|
||||
f->setTexture(4,"door_steel_wb.png[transformFX");
|
||||
f->setInventoryTexture("door_steel_w_inv.png");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -2026,8 +2049,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Steel Windowed Door");
|
||||
f->setAllTextures("door_steel_wlt.png");
|
||||
f->setInventoryTexture("door_steel_wl_inv.png");
|
||||
f->setAllTextures("door_steel_wt.png");
|
||||
f->setTexture(4,"door_steel_wt.png[transformFX");
|
||||
f->setInventoryTexture("door_steel_w_inv.png");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -2042,8 +2066,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Right Hanging Wood Door");
|
||||
f->setAllTextures("door_wood_rb.png");
|
||||
f->setInventoryTexture("door_wood_r_inv.png");
|
||||
f->setAllTextures("door_wood_b.png[transformFX");
|
||||
f->setTexture(4,"door_wood_b.png");
|
||||
f->setInventoryTexture("door_wood_inv.png[transformFX");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -2054,8 +2079,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Right Hanging Wood Door");
|
||||
f->setAllTextures("door_wood_rt.png");
|
||||
f->setInventoryTexture("door_wood_r_inv.png");
|
||||
f->setAllTextures("door_wood_t.png[transformFX");
|
||||
f->setTexture(4,"door_wood_t.png");
|
||||
f->setInventoryTexture("door_wood_inv.png[transformFX");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -2068,8 +2094,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Right Hanging Steel Door");
|
||||
f->setAllTextures("door_steel_rb.png");
|
||||
f->setInventoryTexture("door_steel_r_inv.png");
|
||||
f->setAllTextures("door_steel_b.png[transformFX");
|
||||
f->setTexture(4,"door_steel_b.png");
|
||||
f->setInventoryTexture("door_steel_inv.png[transformFX");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -2082,8 +2109,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Right Hanging Steel Door");
|
||||
f->setAllTextures("door_steel_rt.png");
|
||||
f->setInventoryTexture("door_steel_r_inv.png");
|
||||
f->setAllTextures("door_steel_b.png[transformFX");
|
||||
f->setTexture(4,"door_steel_b.png");
|
||||
f->setInventoryTexture("door_steel_inv.png[transformFX");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -2097,8 +2125,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Right Hanging Wood Windowed Door");
|
||||
f->setAllTextures("door_wood_wrb.png");
|
||||
f->setInventoryTexture("door_wood_wr_inv.png");
|
||||
f->setAllTextures("door_wood_wb.png[transformFX");
|
||||
f->setTexture(4,"door_wood_wb.png");
|
||||
f->setInventoryTexture("door_wood_w_inv.png[transformFX");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -2109,8 +2138,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Right Hanging Wood Windowed Door");
|
||||
f->setAllTextures("door_wood_wrt.png");
|
||||
f->setInventoryTexture("door_wood_wr_inv.png");
|
||||
f->setAllTextures("door_wood_wt.png[transformFX");
|
||||
f->setTexture(4,"door_wood_wt.png");
|
||||
f->setInventoryTexture("door_wood_w_inv.png[transformFX");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -2122,8 +2152,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Right Hanging Steel Windowed Door");
|
||||
f->setAllTextures("door_steel_wrb.png");
|
||||
f->setInventoryTexture("door_wood_wr_inv.png");
|
||||
f->setAllTextures("door_steel_wb.png[transformFX");
|
||||
f->setTexture(4,"door_steel_wb.png");
|
||||
f->setInventoryTexture("door_steel_w_inv.png[transformFX");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
@ -2136,8 +2167,9 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->description = std::string("Right Hanging Steel Windowed Door");
|
||||
f->setAllTextures("door_steel_wrt.png");
|
||||
f->setInventoryTexture("door_wood_wr_inv.png");
|
||||
f->setAllTextures("door_steel_wt.png[transformFX");
|
||||
f->setTexture(4,"door_steel_wt.png");
|
||||
f->setInventoryTexture("door_steel_w_inv.png[transformFX");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
|
|
144
src/tile.cpp
|
@ -1236,6 +1236,46 @@ bool generate_image(std::string part_of_name, video::IImage *& baseimg,
|
|||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
"[transformN"
|
||||
Rotates and/or flips the image.
|
||||
|
||||
N can be a number (between 0 and 7) or a transform name.
|
||||
Rotations are counter-clockwise.
|
||||
0 I identity
|
||||
1 R90 rotate by 90 degrees
|
||||
2 R180 rotate by 180 degrees
|
||||
3 R270 rotate by 270 degrees
|
||||
4 FX flip X
|
||||
5 FXR90 flip X then rotate by 90 degrees
|
||||
6 FY flip Y
|
||||
7 FYR90 flip Y then rotate by 90 degrees
|
||||
|
||||
Note: Transform names can be concatenated to produce
|
||||
their product (applies the first then the second).
|
||||
The resulting transform will be equivalent to one of the
|
||||
eight existing ones, though (see: dihedral group).
|
||||
*/
|
||||
else if(part_of_name.substr(0,10) == "[transform")
|
||||
{
|
||||
if(baseimg == NULL)
|
||||
{
|
||||
errorstream<<"generate_image(): baseimg==NULL "
|
||||
<<"for part_of_name=\""<<part_of_name
|
||||
<<"\", cancelling."<<std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
u32 transform = parseImageTransform(part_of_name.substr(10));
|
||||
core::dimension2d<u32> dim = imageTransformDimension(
|
||||
transform, baseimg->getDimension());
|
||||
video::IImage *image = driver->createImage(
|
||||
baseimg->getColorFormat(), dim);
|
||||
assert(image);
|
||||
imageTransform(transform, baseimg, image);
|
||||
baseimg->drop();
|
||||
baseimg = image;
|
||||
}
|
||||
/*
|
||||
[inventorycube{topimage{leftimage{rightimage
|
||||
In every subimage, replace ^ with &.
|
||||
|
@ -1510,3 +1550,107 @@ void make_progressbar(float value, video::IImage *image)
|
|||
}
|
||||
}
|
||||
|
||||
u32 parseImageTransform(const std::string& s)
|
||||
{
|
||||
int total_transform = 0;
|
||||
|
||||
std::string transform_names[8];
|
||||
transform_names[0] = "i";
|
||||
transform_names[1] = "r90";
|
||||
transform_names[2] = "r180";
|
||||
transform_names[3] = "r270";
|
||||
transform_names[4] = "fx";
|
||||
transform_names[6] = "fy";
|
||||
|
||||
std::size_t pos = 0;
|
||||
while(pos < s.size())
|
||||
{
|
||||
int transform = -1;
|
||||
for(int i = 0; i <= 7; ++i)
|
||||
{
|
||||
const std::string &name_i = transform_names[i];
|
||||
|
||||
if(s[pos] == ('0' + i))
|
||||
{
|
||||
transform = i;
|
||||
pos++;
|
||||
break;
|
||||
}
|
||||
else if(!(name_i.empty()) &&
|
||||
lowercase(s.substr(pos, name_i.size())) == name_i)
|
||||
{
|
||||
transform = i;
|
||||
pos += name_i.size();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(transform < 0)
|
||||
break;
|
||||
|
||||
// Multiply total_transform and transform in the group D4
|
||||
int new_total = 0;
|
||||
if(transform < 4)
|
||||
new_total = (transform + total_transform) % 4;
|
||||
else
|
||||
new_total = (transform - total_transform + 8) % 4;
|
||||
if((transform >= 4) ^ (total_transform >= 4))
|
||||
new_total += 4;
|
||||
|
||||
total_transform = new_total;
|
||||
}
|
||||
return total_transform;
|
||||
}
|
||||
|
||||
core::dimension2d<u32> imageTransformDimension(u32 transform, core::dimension2d<u32> dim)
|
||||
{
|
||||
if(transform % 2 == 0)
|
||||
return dim;
|
||||
else
|
||||
return core::dimension2d<u32>(dim.Height, dim.Width);
|
||||
}
|
||||
|
||||
void imageTransform(u32 transform, video::IImage *src, video::IImage *dst)
|
||||
{
|
||||
if(src == NULL || dst == NULL)
|
||||
return;
|
||||
|
||||
core::dimension2d<u32> srcdim = src->getDimension();
|
||||
core::dimension2d<u32> dstdim = dst->getDimension();
|
||||
|
||||
assert(dstdim == imageTransformDimension(transform, srcdim));
|
||||
assert(transform >= 0 && transform <= 7);
|
||||
|
||||
/*
|
||||
Compute the transformation from source coordinates (sx,sy)
|
||||
to destination coordinates (dx,dy).
|
||||
*/
|
||||
int sxn = 0;
|
||||
int syn = 2;
|
||||
if(transform == 0) // identity
|
||||
sxn = 0, syn = 2; // sx = dx, sy = dy
|
||||
else if(transform == 1) // rotate by 90 degrees ccw
|
||||
sxn = 3, syn = 0; // sx = (H-1) - dy, sy = dx
|
||||
else if(transform == 2) // rotate by 180 degrees
|
||||
sxn = 1, syn = 3; // sx = (W-1) - dx, sy = (H-1) - dy
|
||||
else if(transform == 3) // rotate by 270 degrees ccw
|
||||
sxn = 2, syn = 1; // sx = dy, sy = (W-1) - dx
|
||||
else if(transform == 4) // flip x
|
||||
sxn = 1, syn = 2; // sx = (W-1) - dx, sy = dy
|
||||
else if(transform == 5) // flip x then rotate by 90 degrees ccw
|
||||
sxn = 2, syn = 0; // sx = dy, sy = dx
|
||||
else if(transform == 6) // flip y
|
||||
sxn = 0, syn = 3; // sx = dx, sy = (H-1) - dy
|
||||
else if(transform == 7) // flip y then rotate by 90 degrees ccw
|
||||
sxn = 3, syn = 1; // sx = (H-1) - dy, sy = (W-1) - dx
|
||||
|
||||
for(u32 dy=0; dy<dstdim.Height; dy++)
|
||||
for(u32 dx=0; dx<dstdim.Width; dx++)
|
||||
{
|
||||
u32 entries[4] = {dx, dstdim.Width-1-dx, dy, dstdim.Height-1-dy};
|
||||
u32 sx = entries[sxn];
|
||||
u32 sy = entries[syn];
|
||||
video::SColor c = src->getPixel(sx,sy);
|
||||
dst->setPixel(dx,dy,c);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -42,6 +42,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
std::string getTexturePath(const std::string &filename);
|
||||
std::string getModelPath(const std::string &filename);
|
||||
|
||||
u32 parseImageTransform(const std::string& s);
|
||||
core::dimension2d<u32> imageTransformDimension(u32 transform, core::dimension2d<u32> dim);
|
||||
void imageTransform(u32 transform, video::IImage *src, video::IImage *dst);
|
||||
|
||||
/*
|
||||
Specifies a texture in an atlas.
|
||||
|
||||
|
|