Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 73a5e98

Browse files
committedMar 23, 2013
Merge pull request #564 from RealBadAngel/master
6d facedir
2 parents 2318d19 + b1c2bed commit 73a5e98

File tree

5 files changed

+335
-86
lines changed

5 files changed

+335
-86
lines changed
 

‎doc/lua_api.txt

+4
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,10 @@ param2 is reserved for the engine when any of these are used:
310310
paramtype2 == "facedir"
311311
^ The rotation of the node is stored in param2. Furnaces and chests are
312312
rotated this way. Can be made by using minetest.dir_to_facedir().
313+
Values range 0 - 23
314+
facedir modulo 4 = axisdir
315+
0 = y+ 1 = z+ 2 = z- 3 = x+ 4 = x- 5 = y-
316+
facedir's two less significant bits are rotation around the axis
313317

314318
Nodes can also contain extra data. See "Node Metadata".
315319

‎src/content_mapblock.cpp

+95-19
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
4242
// (compatible with ContentFeatures). If you specified 0,0,1,1
4343
// for each face, that would be the same as passing NULL.
4444
void makeCuboid(MeshCollector *collector, const aabb3f &box,
45-
const TileSpec *tiles, int tilecount,
45+
TileSpec *tiles, int tilecount,
4646
video::SColor &c, const f32* txc)
4747
{
4848
assert(tilecount >= 1 && tilecount <= 6);
4949

5050
v3f min = box.MinEdge;
5151
v3f max = box.MaxEdge;
52-
52+
53+
54+
5355
if(txc == NULL)
5456
{
5557
static const f32 txc_default[24] = {
@@ -97,15 +99,70 @@ void makeCuboid(MeshCollector *collector, const aabb3f &box,
9799
video::S3DVertex(min.X,min.Y,min.Z, 0,0,-1, c, txc[20],txc[23]),
98100
};
99101

100-
for(s32 j=0; j<24; j++)
102+
v2f t;
103+
for(int i = 0; i < tilecount; i++)
104+
{
105+
switch (tiles[i].rotation)
106+
{
107+
case 0:
108+
break;
109+
case 1: //R90
110+
for (int x = 0; x < 4; x++)
111+
vertices[i*4+x].TCoords.rotateBy(90,irr::core::vector2df(0, 0));
112+
break;
113+
case 2: //R180
114+
for (int x = 0; x < 4; x++)
115+
vertices[i*4+x].TCoords.rotateBy(180,irr::core::vector2df(0, 0));
116+
break;
117+
case 3: //R270
118+
for (int x = 0; x < 4; x++)
119+
vertices[i*4+x].TCoords.rotateBy(270,irr::core::vector2df(0, 0));
120+
break;
121+
case 4: //FXR90
122+
for (int x = 0; x < 4; x++)
123+
vertices[i*4+x].TCoords.rotateBy(90,irr::core::vector2df(0, 0));
124+
125+
tiles[i].texture.pos.Y += tiles[i].texture.size.Y;
126+
tiles[i].texture.size.Y *= -1;
127+
break;
128+
case 5: //FXR270
129+
for (int x = 0; x < 4; x++)
130+
vertices[i*4+x].TCoords.rotateBy(270,irr::core::vector2df(0, 0));
131+
t=vertices[i*4].TCoords;
132+
tiles[i].texture.pos.Y += tiles[i].texture.size.Y;
133+
tiles[i].texture.size.Y *= -1;
134+
break;
135+
case 6: //FYR90
136+
for (int x = 0; x < 4; x++)
137+
vertices[i*4+x].TCoords.rotateBy(90,irr::core::vector2df(0, 0));
138+
tiles[i].texture.pos.X += tiles[i].texture.size.X;
139+
tiles[i].texture.size.X *= -1;
140+
break;
141+
case 7: //FYR270
142+
for (int x = 0; x < 4; x++)
143+
vertices[i*4+x].TCoords.rotateBy(270,irr::core::vector2df(0, 0));
144+
tiles[i].texture.pos.X += tiles[i].texture.size.X;
145+
tiles[i].texture.size.X *= -1;
146+
break;
147+
case 8: //FX
148+
tiles[i].texture.pos.Y += tiles[i].texture.size.Y;
149+
tiles[i].texture.size.Y *= -1;
150+
break;
151+
case 9: //FY
152+
tiles[i].texture.pos.X += tiles[i].texture.size.X;
153+
tiles[i].texture.size.X *= -1;
154+
break;
155+
default:
156+
break;
157+
}
158+
}
159+
for(s32 j=0; j<24; j++)
101160
{
102161
int tileindex = MYMIN(j/4, tilecount-1);
103162
vertices[j].TCoords *= tiles[tileindex].texture.size;
104163
vertices[j].TCoords += tiles[tileindex].texture.pos;
105164
}
106-
107165
u16 indices[] = {0,1,2,2,3,0};
108-
109166
// Add to mesh collector
110167
for(s32 j=0; j<24; j+=4)
111168
{
@@ -1154,14 +1211,8 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
11541211
v3s16(0, 0, 1),
11551212
v3s16(0, 0, -1)
11561213
};
1157-
11581214
TileSpec tiles[6];
1159-
for(int i = 0; i < 6; i++)
1160-
{
1161-
// Handles facedir rotation for textures
1162-
tiles[i] = getNodeTile(n, p, tile_dirs[i], data);
1163-
}
1164-
1215+
11651216
u16 l = getInteriorLight(n, 0, data);
11661217
video::SColor c = MapBlock_LightColor(255, l, decode_light(f.light_source));
11671218

@@ -1172,17 +1223,43 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
11721223
i = boxes.begin();
11731224
i != boxes.end(); i++)
11741225
{
1226+
for(int j = 0; j < 6; j++)
1227+
{
1228+
// Handles facedir rotation for textures
1229+
tiles[j] = getNodeTile(n, p, tile_dirs[j], data);
1230+
}
11751231
aabb3f box = *i;
11761232
box.MinEdge += pos;
11771233
box.MaxEdge += pos;
1234+
1235+
f32 temp;
1236+
if (box.MinEdge.X > box.MaxEdge.X)
1237+
{
1238+
temp=box.MinEdge.X;
1239+
box.MinEdge.X=box.MaxEdge.X;
1240+
box.MaxEdge.X=temp;
1241+
}
1242+
if (box.MinEdge.Y > box.MaxEdge.Y)
1243+
{
1244+
temp=box.MinEdge.Y;
1245+
box.MinEdge.Y=box.MaxEdge.Y;
1246+
box.MaxEdge.Y=temp;
1247+
}
1248+
if (box.MinEdge.Z > box.MaxEdge.Z)
1249+
{
1250+
temp=box.MinEdge.Z;
1251+
box.MinEdge.Z=box.MaxEdge.Z;
1252+
box.MaxEdge.Z=temp;
1253+
}
11781254

1255+
//
11791256
// Compute texture coords
1180-
f32 tx1 = (i->MinEdge.X/BS)+0.5;
1181-
f32 ty1 = (i->MinEdge.Y/BS)+0.5;
1182-
f32 tz1 = (i->MinEdge.Z/BS)+0.5;
1183-
f32 tx2 = (i->MaxEdge.X/BS)+0.5;
1184-
f32 ty2 = (i->MaxEdge.Y/BS)+0.5;
1185-
f32 tz2 = (i->MaxEdge.Z/BS)+0.5;
1257+
f32 tx1 = (box.MinEdge.X/BS)+0.5;
1258+
f32 ty1 = (box.MinEdge.Y/BS)+0.5;
1259+
f32 tz1 = (box.MinEdge.Z/BS)+0.5;
1260+
f32 tx2 = (box.MaxEdge.X/BS)+0.5;
1261+
f32 ty2 = (box.MaxEdge.Y/BS)+0.5;
1262+
f32 tz2 = (box.MaxEdge.Z/BS)+0.5;
11861263
f32 txc[24] = {
11871264
// up
11881265
tx1, 1-tz2, tx2, 1-tz1,
@@ -1197,7 +1274,6 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
11971274
// front
11981275
tx1, 1-ty2, tx2, 1-ty1,
11991276
};
1200-
12011277
makeCuboid(&collector, box, tiles, 6, c, txc);
12021278
}
12031279
break;}

‎src/mapblock_mesh.cpp

+114-49
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,80 @@ static void makeFastFace(TileSpec tile, u16 li0, u16 li1, u16 li2, u16 li3,
455455
v3f vertex_pos[4];
456456
v3s16 vertex_dirs[4];
457457
getNodeVertexDirs(dir, vertex_dirs);
458+
v3s16 t;
459+
switch (tile.rotation)
460+
{
461+
case 0:
462+
break;
463+
case 1: //R90
464+
t = vertex_dirs[0];
465+
vertex_dirs[0] = vertex_dirs[3];
466+
vertex_dirs[3] = vertex_dirs[2];
467+
vertex_dirs[2] = vertex_dirs[1];
468+
vertex_dirs[1] = t;
469+
break;
470+
case 2: //R180
471+
t = vertex_dirs[0];
472+
vertex_dirs[0] = vertex_dirs[2];
473+
vertex_dirs[2] = t;
474+
t = vertex_dirs[1];
475+
vertex_dirs[1] = vertex_dirs[3];
476+
vertex_dirs[3] = t;
477+
break;
478+
case 3: //R270
479+
t = vertex_dirs[0];
480+
vertex_dirs[0] = vertex_dirs[1];
481+
vertex_dirs[1] = vertex_dirs[2];
482+
vertex_dirs[2] = vertex_dirs[3];
483+
vertex_dirs[3] = t;
484+
break;
485+
case 4: //FXR90
486+
t = vertex_dirs[0];
487+
vertex_dirs[0] = vertex_dirs[3];
488+
vertex_dirs[3] = vertex_dirs[2];
489+
vertex_dirs[2] = vertex_dirs[1];
490+
vertex_dirs[1] = t;
491+
tile.texture.pos.Y += tile.texture.size.Y;
492+
tile.texture.size.Y *= -1;
493+
break;
494+
case 5: //FXR270
495+
t = vertex_dirs[0];
496+
vertex_dirs[0] = vertex_dirs[1];
497+
vertex_dirs[1] = vertex_dirs[2];
498+
vertex_dirs[2] = vertex_dirs[3];
499+
vertex_dirs[3] = t;
500+
tile.texture.pos.Y += tile.texture.size.Y;
501+
tile.texture.size.Y *= -1;
502+
break;
503+
case 6: //FYR90
504+
t = vertex_dirs[0];
505+
vertex_dirs[0] = vertex_dirs[3];
506+
vertex_dirs[3] = vertex_dirs[2];
507+
vertex_dirs[2] = vertex_dirs[1];
508+
vertex_dirs[1] = t;
509+
tile.texture.pos.X += tile.texture.size.X;
510+
tile.texture.size.X *= -1;
511+
break;
512+
case 7: //FYR270
513+
t = vertex_dirs[0];
514+
vertex_dirs[0] = vertex_dirs[1];
515+
vertex_dirs[1] = vertex_dirs[2];
516+
vertex_dirs[2] = vertex_dirs[3];
517+
vertex_dirs[3] = t;
518+
tile.texture.pos.X += tile.texture.size.X;
519+
tile.texture.size.X *= -1;
520+
break;
521+
case 8: //FX
522+
tile.texture.pos.Y += tile.texture.size.Y;
523+
tile.texture.size.Y *= -1;
524+
break;
525+
case 9: //FY
526+
tile.texture.pos.X += tile.texture.size.X;
527+
tile.texture.size.X *= -1;
528+
break;
529+
default:
530+
break;
531+
}
458532
for(u16 i=0; i<4; i++)
459533
{
460534
vertex_pos[i] = v3f(
@@ -601,60 +675,50 @@ TileSpec getNodeTile(MapNode mn, v3s16 p, v3s16 dir, MeshMakeData *data)
601675
// 5 = (0,0,-1)
602676
// 6 = (0,-1,0)
603677
// 7 = (-1,0,0)
604-
u8 dir_i = (dir.X + 2 * dir.Y + 3 * dir.Z) & 7;
678+
u8 dir_i = ((dir.X + 2 * dir.Y + 3 * dir.Z) & 7)*2;
605679

606680
// Get rotation for things like chests
607681
u8 facedir = mn.getFaceDir(ndef);
608-
assert(facedir <= 3);
609-
610-
static const u8 dir_to_tile[4 * 8] =
682+
assert(facedir <= 23);
683+
static const u16 dir_to_tile[24 * 16] =
611684
{
612-
// 0 +X +Y +Z 0 -Z -Y -X
613-
0, 2, 0, 4, 0, 5, 1, 3, // facedir = 0
614-
0, 4, 0, 3, 0, 2, 1, 5, // facedir = 1
615-
0, 3, 0, 5, 0, 4, 1, 2, // facedir = 2
616-
0, 5, 0, 2, 0, 3, 1, 4, // facedir = 3
685+
// 0 +X +Y +Z -Z -Y -X -> value=tile,rotation
686+
0,0, 2,0 , 0,0 , 4,0 , 0,0, 5,0 , 1,0 , 3,0 , // rotate around y+ 0 - 3
687+
0,0, 4,0 , 0,3 , 3,0 , 0,0, 2,0 , 1,1 , 5,0 ,
688+
0,0, 3,0 , 0,2 , 5,0 , 0,0, 4,0 , 1,2 , 2,0 ,
689+
0,0, 5,0 , 0,1 , 2,0 , 0,0, 3,0 , 1,3 , 4,0 ,
690+
691+
0,0, 2,3 , 5,0 , 0,2 , 0,0, 1,0 , 4,2 , 3,1 , // rotate around z+ 4 - 7
692+
0,0, 4,3 , 2,0 , 0,3 , 0,0, 1,1 , 3,2 , 5,1 ,
693+
0,0, 3,3 , 4,0 , 0,0 , 0,0, 1,2 , 5,2 , 2,1 ,
694+
0,0, 5,3 , 3,0 , 0,1 , 0,0, 1,3 , 2,2 , 4,1 ,
695+
696+
0,0, 2,1 , 4,2 , 1,2 , 0,0, 0,0 , 5,0 , 3,3 , // rotate around z- 8 - 11
697+
0,0, 4,1 , 3,2 , 1,3 , 0,0, 0,3 , 2,0 , 5,3 ,
698+
0,0, 3,1 , 5,2 , 1,0 , 0,0, 0,2 , 4,0 , 2,3 ,
699+
0,0, 5,1 , 2,2 , 1,1 , 0,0, 0,1 , 3,0 , 4,3 ,
700+
701+
0,0, 0,3 , 3,3 , 4,1 , 0,0, 5,3 , 2,3 , 1,3 , // rotate around x+ 12 - 15
702+
0,0, 0,2 , 5,3 , 3,1 , 0,0, 2,3 , 4,3 , 1,0 ,
703+
0,0, 0,1 , 2,3 , 5,1 , 0,0, 4,3 , 3,3 , 1,1 ,
704+
0,0, 0,0 , 4,3 , 2,1 , 0,0, 3,3 , 5,3 , 1,2 ,
705+
706+
0,0, 1,1 , 2,1 , 4,3 , 0,0, 5,1 , 3,1 , 0,1 , // rotate around x- 16 - 19
707+
0,0, 1,2 , 4,1 , 3,3 , 0,0, 2,1 , 5,1 , 0,0 ,
708+
0,0, 1,3 , 3,1 , 5,3 , 0,0, 4,1 , 2,1 , 0,3 ,
709+
0,0, 1,0 , 5,1 , 2,3 , 0,0, 3,1 , 4,1 , 0,2 ,
710+
711+
0,0, 3,2 , 1,2 , 4,2 , 0,0, 5,2 , 0,2 , 2,2 , // rotate around y- 20 - 23
712+
0,0, 5,2 , 1,3 , 3,2 , 0,0, 2,2 , 0,1 , 4,2 ,
713+
0,0, 2,2 , 1,0 , 5,2 , 0,0, 4,2 , 0,0 , 3,2 ,
714+
0,0, 4,2 , 1,1 , 2,2 , 0,0, 3,2 , 0,3 , 5,2
715+
617716
};
618-
u8 tileindex = dir_to_tile[facedir*8 + dir_i];
619-
620-
// If not rotated or is side tile, we're done
621-
if(facedir == 0 || (tileindex != 0 && tileindex != 1))
622-
return getNodeTileN(mn, p, tileindex, data);
623-
624-
// This is the top or bottom tile, and it shall be rotated; thus rotate it
625-
TileSpec spec = getNodeTileN(mn, p, tileindex, data);
626-
if(tileindex == 0){
627-
if(facedir == 1){ // -90
628-
std::string name = data->m_gamedef->tsrc()->getTextureName(spec.texture.id);
629-
name += "^[transformR270";
630-
spec.texture = data->m_gamedef->tsrc()->getTexture(name);
631-
}
632-
else if(facedir == 2){ // 180
633-
spec.texture.pos += spec.texture.size;
634-
spec.texture.size *= -1;
635-
}
636-
else if(facedir == 3){ // 90
637-
std::string name = data->m_gamedef->tsrc()->getTextureName(spec.texture.id);
638-
name += "^[transformR90";
639-
spec.texture = data->m_gamedef->tsrc()->getTexture(name);
640-
}
641-
}
642-
else if(tileindex == 1){
643-
if(facedir == 1){ // -90
644-
std::string name = data->m_gamedef->tsrc()->getTextureName(spec.texture.id);
645-
name += "^[transformR90";
646-
spec.texture = data->m_gamedef->tsrc()->getTexture(name);
647-
}
648-
else if(facedir == 2){ // 180
649-
spec.texture.pos += spec.texture.size;
650-
spec.texture.size *= -1;
651-
}
652-
else if(facedir == 3){ // 90
653-
std::string name = data->m_gamedef->tsrc()->getTextureName(spec.texture.id);
654-
name += "^[transformR270";
655-
spec.texture = data->m_gamedef->tsrc()->getTexture(name);
656-
}
657-
}
717+
u16 tile_index=facedir*16 + dir_i;
718+
TileSpec spec = getNodeTileN(mn, p, dir_to_tile[tile_index], data);
719+
spec.rotation=dir_to_tile[tile_index + 1];
720+
std::string name = data->m_gamedef->tsrc()->getTextureName(spec.texture.id);
721+
spec.texture = data->m_gamedef->tsrc()->getTexture(name);
658722
return spec;
659723
}
660724

@@ -794,6 +858,7 @@ static void updateFastFaceRow(
794858
&& next_lights[2] == lights[2]
795859
&& next_lights[3] == lights[3]
796860
&& next_tile == tile
861+
&& tile.rotation == 0
797862
&& next_light_source == light_source)
798863
{
799864
next_is_different = false;

‎src/mapnode.cpp

+119-17
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ u8 MapNode::getFaceDir(INodeDefManager *nodemgr) const
107107
{
108108
const ContentFeatures &f = nodemgr->get(*this);
109109
if(f.param_type_2 == CPT2_FACEDIR)
110-
return getParam2() & 0x03;
110+
return getParam2() & 0x1F;
111111
return 0;
112112
}
113113

@@ -140,29 +140,131 @@ static std::vector<aabb3f> transformNodeBox(const MapNode &n,
140140
{
141141
const std::vector<aabb3f> &fixed = nodebox.fixed;
142142
int facedir = n.getFaceDir(nodemgr);
143+
u8 axisdir = facedir>>2;
144+
facedir&=0x03;
143145
for(std::vector<aabb3f>::const_iterator
144146
i = fixed.begin();
145147
i != fixed.end(); i++)
146148
{
147149
aabb3f box = *i;
148-
if(facedir == 1)
150+
switch (axisdir)
149151
{
150-
box.MinEdge.rotateXZBy(-90);
151-
box.MaxEdge.rotateXZBy(-90);
152-
box.repair();
153-
}
154-
else if(facedir == 2)
155-
{
156-
box.MinEdge.rotateXZBy(180);
157-
box.MaxEdge.rotateXZBy(180);
158-
box.repair();
159-
}
160-
else if(facedir == 3)
161-
{
162-
box.MinEdge.rotateXZBy(90);
163-
box.MaxEdge.rotateXZBy(90);
164-
box.repair();
152+
case 0:
153+
if(facedir == 1)
154+
{
155+
box.MinEdge.rotateXZBy(-90);
156+
box.MaxEdge.rotateXZBy(-90);
157+
}
158+
else if(facedir == 2)
159+
{
160+
box.MinEdge.rotateXZBy(180);
161+
box.MaxEdge.rotateXZBy(180);
162+
}
163+
else if(facedir == 3)
164+
{
165+
box.MinEdge.rotateXZBy(90);
166+
box.MaxEdge.rotateXZBy(90);
167+
}
168+
break;
169+
case 1: // z+
170+
box.MinEdge.rotateYZBy(90);
171+
box.MaxEdge.rotateYZBy(90);
172+
if(facedir == 1)
173+
{
174+
box.MinEdge.rotateXYBy(90);
175+
box.MaxEdge.rotateXYBy(90);
176+
}
177+
else if(facedir == 2)
178+
{
179+
box.MinEdge.rotateXYBy(180);
180+
box.MaxEdge.rotateXYBy(180);
181+
}
182+
else if(facedir == 3)
183+
{
184+
box.MinEdge.rotateXYBy(-90);
185+
box.MaxEdge.rotateXYBy(-90);
186+
}
187+
break;
188+
case 2: //z-
189+
box.MinEdge.rotateYZBy(-90);
190+
box.MaxEdge.rotateYZBy(-90);
191+
if(facedir == 1)
192+
{
193+
box.MinEdge.rotateXYBy(-90);
194+
box.MaxEdge.rotateXYBy(-90);
195+
}
196+
else if(facedir == 2)
197+
{
198+
box.MinEdge.rotateXYBy(180);
199+
box.MaxEdge.rotateXYBy(180);
200+
}
201+
else if(facedir == 3)
202+
{
203+
box.MinEdge.rotateXYBy(90);
204+
box.MaxEdge.rotateXYBy(90);
205+
}
206+
break;
207+
case 3: //x+
208+
box.MinEdge.rotateXYBy(-90);
209+
box.MaxEdge.rotateXYBy(-90);
210+
if(facedir == 1)
211+
{
212+
box.MinEdge.rotateYZBy(90);
213+
box.MaxEdge.rotateYZBy(90);
214+
}
215+
else if(facedir == 2)
216+
{
217+
box.MinEdge.rotateYZBy(180);
218+
box.MaxEdge.rotateYZBy(180);
219+
}
220+
else if(facedir == 3)
221+
{
222+
box.MinEdge.rotateYZBy(-90);
223+
box.MaxEdge.rotateYZBy(-90);
224+
}
225+
break;
226+
case 4: //x-
227+
box.MinEdge.rotateXYBy(90);
228+
box.MaxEdge.rotateXYBy(90);
229+
if(facedir == 1)
230+
{
231+
box.MinEdge.rotateYZBy(-90);
232+
box.MaxEdge.rotateYZBy(-90);
233+
}
234+
else if(facedir == 2)
235+
{
236+
box.MinEdge.rotateYZBy(180);
237+
box.MaxEdge.rotateYZBy(180);
238+
}
239+
else if(facedir == 3)
240+
{
241+
box.MinEdge.rotateYZBy(90);
242+
box.MaxEdge.rotateYZBy(90);
243+
}
244+
break;
245+
case 5:
246+
box.MinEdge.rotateXYBy(-180);
247+
box.MaxEdge.rotateXYBy(-180);
248+
if(facedir == 1)
249+
{
250+
box.MinEdge.rotateXZBy(90);
251+
box.MaxEdge.rotateXZBy(90);
252+
}
253+
else if(facedir == 2)
254+
{
255+
box.MinEdge.rotateXZBy(180);
256+
box.MaxEdge.rotateXZBy(180);
257+
}
258+
else if(facedir == 3)
259+
{
260+
box.MinEdge.rotateXZBy(-90);
261+
box.MaxEdge.rotateXZBy(-90);
262+
}
263+
break;
264+
default:
265+
break;
165266
}
267+
box.repair();
166268
boxes.push_back(box);
167269
}
168270
}

‎src/tile.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ struct TileSpec
205205
texture == other.texture &&
206206
alpha == other.alpha &&
207207
material_type == other.material_type &&
208-
material_flags == other.material_flags
208+
material_flags == other.material_flags &&
209+
rotation == other.rotation
209210
);
210211
}
211212

@@ -264,6 +265,7 @@ struct TileSpec
264265
// Animation parameters
265266
u8 animation_frame_count;
266267
u16 animation_frame_length_ms;
268+
u8 rotation;
267269
};
268270

269271
#endif

0 commit comments

Comments
 (0)
Please sign in to comment.