Add corner blocks

This commit is contained in:
Miloslav Ciz 2024-10-01 22:38:49 +02:00
parent fa22cf0e9c
commit 7d7830073a
3 changed files with 39 additions and 2 deletions

21
map.h
View file

@ -83,7 +83,9 @@
#define LCR_BLOCK_RAMP_CURVED 0x09
#define LCR_BLOCK_RAMP_CURVED_SHORT 0x0a
#define LCR_BLOCK_RAMP_CURVED_WALL 0x0b
#define LCR_BLOCK_RAMP_STEEP 0x0c
#define LCR_BLOCK_RAMP_STEEP 0x0c ///< extremely steep ramp
#define LCR_BLOCK_CORNER 0x0d ///< diagonal corner
#define LCR_BLOCK_CORNER_12 0x0e ///< diagonal corner (1/2 wide)
#define LCR_BLOCK_FULL_ACCEL 0x20
#define LCR_BLOCK_FULL_FAN 0x30
@ -600,6 +602,23 @@ void LCR_mapGetBlockShape(uint8_t blockType, uint8_t transform,
break;
}
case LCR_BLOCK_CORNER:
case LCR_BLOCK_CORNER_12:
{
uint8_t right = blockType == LCR_BLOCK_CORNER ? 6 : 3;
ADD(0,0,0) ADD(right,0,6) ADD(right,4,6) // front/right
ADD(0,0,0) ADD(right,4,6) ADD(0,4,0) // front/right
ADD(0,0,0) ADD(0,4,6) ADD(0,0,6) // left
ADD(0,0,0) ADD(0,4,0) ADD(0,4,6) // left
ADD(right,0,6) ADD(0,0,6) ADD(0,4,6) // back
ADD(0,4,6) ADD(right,4,6) ADD(right,0,6) // back
ADD(0,4,0) ADD(right,4,6) ADD(0,4,6) // top
ADD(0,0,6) ADD(right,0,6) ADD(0,0,0) // bottom
break;
}
default: break;
}