mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-22 17:12:25 -05:00
get top and bottom face working
This commit is contained in:
parent
8e8e6af065
commit
3231ce4e3f
1 changed files with 21 additions and 4 deletions
|
@ -196,6 +196,12 @@ namespace ClassicalSharp {
|
||||||
float y1_x1z1 = y1, y1_x1z2 = y1, y1_x2z1 = y1, y1_x2z2 = y1;
|
float y1_x1z1 = y1, y1_x1z2 = y1, y1_x2z1 = y1, y1_x2z2 = y1;
|
||||||
if (info.Draw[curBlock] == DrawType.SlopeUpXMax) {
|
if (info.Draw[curBlock] == DrawType.SlopeUpXMax) {
|
||||||
y1_x2z1 = y2; y1_x2z2 = y2;
|
y1_x2z1 = y2; y1_x2z2 = y2;
|
||||||
|
} else if (info.Draw[curBlock] == DrawType.SlopeUpXMin) {
|
||||||
|
y1_x1z1 = y2; y1_x1z2 = y2;
|
||||||
|
} else if (info.Draw[curBlock] == DrawType.SlopeUpZMin) {
|
||||||
|
y1_x1z1 = y2; y1_x2z1 = y2;
|
||||||
|
} else if (info.Draw[curBlock] == DrawType.SlopeUpZMax) {
|
||||||
|
y1_x1z2 = y2; y1_x2z2 = y2;
|
||||||
}
|
}
|
||||||
|
|
||||||
part.vertices[part.vIndex.bottom++] = new VertexP3fT2fC4b(x2 + (count - 1), y1_x2z2, z2, u2, v2, col);
|
part.vertices[part.vIndex.bottom++] = new VertexP3fT2fC4b(x2 + (count - 1), y1_x2z2, z2, u2, v2, col);
|
||||||
|
@ -217,10 +223,21 @@ namespace ClassicalSharp {
|
||||||
int col = fullBright ? FastColour.WhitePacked : lighting.LightCol_YTop_Fast(X, Y - offset, Z);
|
int col = fullBright ? FastColour.WhitePacked : lighting.LightCol_YTop_Fast(X, Y - offset, Z);
|
||||||
if (tinted) col = TintBlock(curBlock, col);
|
if (tinted) col = TintBlock(curBlock, col);
|
||||||
|
|
||||||
part.vertices[part.vIndex.top++] = new VertexP3fT2fC4b(x2 + (count - 1), y2, z1, u2, v1, col);
|
float y2_x1z1 = y2, y2_x1z2 = y2, y2_x2z1 = y2, y2_x2z2 = y2;
|
||||||
part.vertices[part.vIndex.top++] = new VertexP3fT2fC4b(x1, y2, z1, u1, v1, col);
|
if (info.Draw[curBlock] == DrawType.SlopeDownXMax) {
|
||||||
part.vertices[part.vIndex.top++] = new VertexP3fT2fC4b(x1, y2, z2, u1, v2, col);
|
y2_x2z1 = y1; y2_x2z2 = y1;
|
||||||
part.vertices[part.vIndex.top++] = new VertexP3fT2fC4b(x2 + (count - 1), y2, z2, u2, v2, col);
|
} else if (info.Draw[curBlock] == DrawType.SlopeDownXMin) {
|
||||||
|
y2_x1z1 = y1; y2_x1z2 = y1;
|
||||||
|
} else if (info.Draw[curBlock] == DrawType.SlopeDownZMin) {
|
||||||
|
y2_x1z1 = y1; y2_x2z1 = y1;
|
||||||
|
} else if (info.Draw[curBlock] == DrawType.SlopeDownZMax) {
|
||||||
|
y2_x1z2 = y1; y2_x2z2 = y1;
|
||||||
|
}
|
||||||
|
|
||||||
|
part.vertices[part.vIndex.top++] = new VertexP3fT2fC4b(x2 + (count - 1), y2_x2z1, z1, u2, v1, col);
|
||||||
|
part.vertices[part.vIndex.top++] = new VertexP3fT2fC4b(x1, y2_x1z1, z1, u1, v1, col);
|
||||||
|
part.vertices[part.vIndex.top++] = new VertexP3fT2fC4b(x1, y2_x1z2, z2, u1, v2, col);
|
||||||
|
part.vertices[part.vIndex.top++] = new VertexP3fT2fC4b(x2 + (count - 1), y2_x2z2, z2, u2, v2, col);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue