Add setting
This commit is contained in:
parent
ca0fc67738
commit
314f27c097
9 changed files with 76 additions and 79 deletions
21
map.h
21
map.h
|
@ -85,7 +85,6 @@
|
|||
|
||||
// normal blocks:
|
||||
#define LCR_BLOCK_FULL '=' ///< completely filled block
|
||||
|
||||
#define LCR_BLOCK_BOTTOM '-' ///< filled bottom half
|
||||
#define LCR_BLOCK_LEFT ';' ///< filled left half
|
||||
#define LCR_BLOCK_BOTTOM_LEFT ',' ///< filled bottom left quarter
|
||||
|
@ -107,42 +106,30 @@
|
|||
#define LCR_BLOCK_BUMP '~' ///< small bump on the road
|
||||
#define LCR_BLOCK_CORNER_CONVEX 'n' ///< curved corner (convex)
|
||||
#define LCR_BLOCK_CORNER_CONCAVE 'u' ///< curved corner (concave)
|
||||
|
||||
#define LCR_BLOCK_FULL_ACCEL '>' ///< full block with accelerator
|
||||
#define LCR_BLOCK_BOTTOM_ACCEL 'z' ///< bottom half block with accelerator
|
||||
#define LCR_BLOCK_RAMP_ACCEL 'y' ///< ramp block with accelerator
|
||||
|
||||
#define LCR_BLOCK_FULL_FAN 'o' ///< full block with fan
|
||||
#define LCR_BLOCK_RAMP_FAN 'V' ///< ramp block with fan
|
||||
|
||||
#define LCR_BLOCK_CHECKPOINT_0 '+' ///< checkpoint, not taken
|
||||
#define LCR_BLOCK_CHECKPOINT_1 '\t' ///< checkpoint, taken
|
||||
|
||||
#define LCR_BLOCK_FINISH '!' ///< finish
|
||||
|
||||
// special blocks:
|
||||
#define LCR_BLOCK_NONE 'x' ///< no block (to make holes etc.)
|
||||
|
||||
#define LCR_BLOCK_CUBOID_FILL 'f' /**< makes a cuboid from the
|
||||
previously specified block, the
|
||||
size is given by block coords */
|
||||
#define LCR_BLOCK_CUBOID_HOLLOW 'h' /**< same as cuboid special block,
|
||||
but makes a hollow one */
|
||||
|
||||
#define LCR_BLOCK_MIRROR 'm' /**< makes a mirror copy along each
|
||||
major axis, starting at coords of
|
||||
last added block and iterating
|
||||
over a block of size given by this
|
||||
block's coords */
|
||||
|
||||
#define LCR_BLOCK_START '*' ///< specifies start block position
|
||||
|
||||
#define LCR_BLOCK_QUIT 'e' /**< special block, ends reading the
|
||||
map (useful when creating maps) */
|
||||
/*
|
||||
TODO:
|
||||
- bigger structures like a loop, sloped road etc?
|
||||
*/
|
||||
|
||||
#define LCR_MAP_BLOCK_CACHE_SIZE (8 * 2) ///< Do not change.
|
||||
|
||||
|
@ -245,9 +232,8 @@ uint8_t LCR_mapBlockGetTransform(const uint8_t block[LCR_BLOCK_SIZE])
|
|||
|
||||
uint8_t LCR_mapBlockGetMaterial(const uint8_t block[LCR_BLOCK_SIZE])
|
||||
{
|
||||
return (LCR_mapBlockIsAccelerator(block[0]) ||
|
||||
LCR_mapBlockIsFan(block[0])) ? LCR_BLOCK_MATERIAL_CONCRETE :
|
||||
((block[3] >> 2) & 0x03);
|
||||
return (LCR_mapBlockIsAccelerator(block[0]) || LCR_mapBlockIsFan(block[0])) ?
|
||||
LCR_BLOCK_MATERIAL_CONCRETE : ((block[3] >> 2) & 0x03);
|
||||
}
|
||||
|
||||
uint32_t LCR_mapBlockGetCoordNumber(const uint8_t block[LCR_BLOCK_SIZE])
|
||||
|
@ -669,7 +655,6 @@ uint8_t LCR_mapLoadFromStr(char (*getNextCharFunc)(void), const char *name)
|
|||
LCR_currentMap.startPos[2] = coords[2];
|
||||
LCR_currentMap.startPos[3] = trans;
|
||||
break;
|
||||
|
||||
// kek, is this legit?
|
||||
case LCR_BLOCK_CHECKPOINT_0:
|
||||
LCR_currentMap.checkpointCount++; // fall through
|
||||
|
@ -853,7 +838,7 @@ void LCR_mapGetBlockShape(uint8_t blockType, uint8_t transform,
|
|||
(blockType == LCR_BLOCK_BOTTOM_LEFT_FRONT)),
|
||||
zBack = 6 >>
|
||||
((blockType == LCR_BLOCK_BOTTOM_LEFT_FRONT) |
|
||||
(blockType == LCR_BLOCK_LEFT_FRONT));
|
||||
(blockType == LCR_BLOCK_LEFT_FRONT));
|
||||
|
||||
ADD(0,0,0) ADD(xRight,0,0) ADD(xRight,yTop,0) // front
|
||||
ADD(0,0,0) ADD(xRight,yTop,0) ADD(0,yTop,0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue