mirror of https://github.com/minetest/minetest.git
Changed syntax and added documentation for texture special command "[sheet".
This commit is contained in:
parent
d0d45fcd78
commit
1dcbd7add8
|
@ -262,6 +262,10 @@ Advanced texture modifiers:
|
|||
Apply a mask to the base image.
|
||||
The mask is applied using binary AND.
|
||||
|
||||
[sheet:<w>x<h>:<x>,<y>
|
||||
Retrieves a tile at position x,y from the base image
|
||||
which it assumes to be a tilesheet with dimensions w,h.
|
||||
|
||||
Sounds
|
||||
-------
|
||||
Only OGG Vorbis files are supported.
|
||||
|
|
|
@ -1135,9 +1135,9 @@ minetest.register_node("default:sign_wall", {
|
|||
|
||||
minetest.register_node("default:chest", {
|
||||
description = "Chest",
|
||||
tiles ={"default_chest.png^[sheet:2:2:0:0", "default_chest.png^[sheet:2:2:0:0",
|
||||
"default_chest.png^[sheet:2:2:1:0", "default_chest.png^[sheet:2:2:1:0",
|
||||
"default_chest.png^[sheet:2:2:1:0", "default_chest.png^[sheet:2:2:0:1"},
|
||||
tiles ={"default_chest.png^[sheet:2x2:0,0", "default_chest.png^[sheet:2x2:0,0",
|
||||
"default_chest.png^[sheet:2x2:1,0", "default_chest.png^[sheet:2x2:1,0",
|
||||
"default_chest.png^[sheet:2x2:1,0", "default_chest.png^[sheet:2x2:0,1"},
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
||||
legacy_facedir_simple = true,
|
||||
|
@ -1169,9 +1169,9 @@ end
|
|||
|
||||
minetest.register_node("default:chest_locked", {
|
||||
description = "Locked Chest",
|
||||
tiles ={"default_chest.png^[sheet:2:2:0:0", "default_chest.png^[sheet:2:2:0:0",
|
||||
"default_chest.png^[sheet:2:2:1:0", "default_chest.png^[sheet:2:2:1:0",
|
||||
"default_chest.png^[sheet:2:2:1:0", "default_chest.png^[sheet:2:2:1:1"},
|
||||
tiles ={"default_chest.png^[sheet:2x2:0,0", "default_chest.png^[sheet:2x2:0,0",
|
||||
"default_chest.png^[sheet:2x2:1,0", "default_chest.png^[sheet:2x2:1,0",
|
||||
"default_chest.png^[sheet:2x2:1,0", "default_chest.png^[sheet:2x2:1,1"},
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
||||
legacy_facedir_simple = true,
|
||||
|
|
|
@ -1589,7 +1589,7 @@ bool TextureSource::generateImagePart(std::string part_of_name,
|
|||
}
|
||||
}
|
||||
/*
|
||||
[sheet:W:H:X:Y
|
||||
[sheet:WxH:X,Y
|
||||
Retrieves a tile at position X,Y (in tiles)
|
||||
from the base image it assumes to be a
|
||||
tilesheet with dimensions W,H (in tiles).
|
||||
|
@ -1605,9 +1605,9 @@ bool TextureSource::generateImagePart(std::string part_of_name,
|
|||
|
||||
Strfnd sf(part_of_name);
|
||||
sf.next(":");
|
||||
u32 w0 = stoi(sf.next(":"));
|
||||
u32 w0 = stoi(sf.next("x"));
|
||||
u32 h0 = stoi(sf.next(":"));
|
||||
u32 x0 = stoi(sf.next(":"));
|
||||
u32 x0 = stoi(sf.next(","));
|
||||
u32 y0 = stoi(sf.next(":"));
|
||||
|
||||
core::dimension2d<u32> img_dim = baseimg->getDimension();
|
||||
|
|
Loading…
Reference in New Issue