Add curved corners
This commit is contained in:
parent
485b09ccbc
commit
93cc5369bd
4 changed files with 79 additions and 5 deletions
18
renderer.h
18
renderer.h
|
@ -720,11 +720,25 @@ uint8_t _LCR_buildMapModel(void)
|
|||
uint8_t blockMat = LCR_mapBlockGetMaterial(block);
|
||||
|
||||
#define VERT(n,c) LCR_renderer.mapVerts[3 * n + c]
|
||||
|
||||
triData =
|
||||
(((VERT(triIndices[0],0) == VERT(triIndices[1],0)) &&
|
||||
(((VERT(triIndices[0],0) == VERT(triIndices[1],0)) && // same X?
|
||||
(VERT(triIndices[1],0) == VERT(triIndices[2],0))) << 4) |
|
||||
(((VERT(triIndices[0],2) == VERT(triIndices[1],2)) &&
|
||||
(((VERT(triIndices[0],2) == VERT(triIndices[1],2)) && // same Z?
|
||||
(VERT(triIndices[1],2) == VERT(triIndices[2],2))) << 5);
|
||||
|
||||
if (!(triData & 0xf0))
|
||||
{
|
||||
// diagonal walls
|
||||
|
||||
triData = (
|
||||
(VERT(triIndices[0],0) == VERT(triIndices[1],0) &&
|
||||
VERT(triIndices[0],2) == VERT(triIndices[1],2)) |
|
||||
(VERT(triIndices[1],0) == VERT(triIndices[2],0) &&
|
||||
VERT(triIndices[1],2) == VERT(triIndices[2],2)) |
|
||||
(VERT(triIndices[0],0) == VERT(triIndices[2],0) &&
|
||||
VERT(triIndices[0],2) == VERT(triIndices[2],2))) << 4;
|
||||
}
|
||||
#undef VERT
|
||||
|
||||
if (triData & 0xf0) // wall?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue