Add curved corners

This commit is contained in:
Miloslav Ciz 2024-12-12 23:17:06 +01:00
parent 485b09ccbc
commit 93cc5369bd
4 changed files with 79 additions and 5 deletions

28
map.h
View file

@ -96,7 +96,6 @@
#define LCR_BLOCK_RAMP_12 '<' ///< plain ramp, 1/2 size
#define LCR_BLOCK_RAMP_14 '_' ///< plain ramp, 1/4 size
#define LCR_BLOCK_RAMP_CORNER 'v' ///< corner of ramp
#define LCR_BLOCK_RAMP_CURVED_PLAT ']' ///< curved ramp with top platgform
#define LCR_BLOCK_RAMP_CURVED ')' ///< curv. ramp without top platf.
#define LCR_BLOCK_RAMP_CURVED_WALL '}' ///< curved ramp plus small wall
@ -108,6 +107,11 @@
#define LCR_BLOCK_FULL_FAN 'o'
#define LCR_BLOCK_BUMP '~' ///< small bump on the road
#define LCR_BLOCK_CORNER_CONVEX 'n'
#define LCR_BLOCK_CORNER_CONCAVE 'l'
#define LCR_BLOCK_CHECKPOINT_0 '+' ///< checkpoint, not taken
#define LCR_BLOCK_CHECKPOINT_1 '\'' ///< checkpoint, taken
@ -821,6 +825,28 @@ void LCR_mapGetBlockShape(uint8_t blockType, uint8_t transform,
break;
}
case LCR_BLOCK_CORNER_CONVEX:
case LCR_BLOCK_CORNER_CONCAVE:
{
uint8_t
mx = blockType == LCR_BLOCK_CORNER_CONVEX ? 4 : 2,
mz = blockType == LCR_BLOCK_CORNER_CONVEX ? 2 : 4;
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(6,0,6) ADD(0,0,6) ADD(0,4,6) // back
ADD(0,4,6) ADD(6,4,6) ADD(6,0,6) // back
ADD(0,0,0) ADD(mx,4,mz) ADD(0,4,0) // right
ADD(mx,0,mz) ADD(mx,4,mz) ADD(0,0,0)
ADD(6,4,6) ADD(mx,4,mz) ADD(6,0,6)
ADD(6,0,6) ADD(mx,4,mz) ADD(mx,0,mz)
ADD(0,4,0) ADD(mx,4,mz) ADD(0,4,6) // top
ADD(0,4,6) ADD(mx,4,mz) ADD(6,4,6)
ADD(0,0,0) ADD(0,0,6) ADD(mx,0,mz) // bottom
ADD(0,0,6) ADD(6,0,6) ADD(mx,0,mz)
break;
}
case LCR_BLOCK_BUMP:
ADD(3,0,0) ADD(6,0,3) ADD(3,1,3) // top
ADD(6,0,3) ADD(3,0,6) ADD(3,1,3)