From 3e6c205302a4da5e1f4c777fbe02f6b67088fc49 Mon Sep 17 00:00:00 2001 From: Miloslav Ciz Date: Mon, 2 Dec 2024 23:05:41 +0100 Subject: [PATCH] Add bump --- assets.h | 1 + map.h | 11 +++++++++++ racing.h | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/assets.h b/assets.h index d647b28..f0b1a0e 100644 --- a/assets.h +++ b/assets.h @@ -24,6 +24,7 @@ static const char *LCR_maps[] = "#=M0s2 #fd190" "#=W0s3 #fd190" "#(s0r0" + "#~t1t2 #~u1t2 #~t1u2" }; #define LCR_IMAGE_SIZE 64 ///< one-dimension resolution of bitmap image diff --git a/map.h b/map.h index 00d2d7c..8313760 100644 --- a/map.h +++ b/map.h @@ -104,6 +104,8 @@ #define LCR_BLOCK_HILL '(' ///< curved "hill" #define LCR_BLOCK_FULL_ACCEL '>' #define LCR_BLOCK_FULL_FAN 'o' +#define LCR_BLOCK_BUMP '~' ///< small bump on the road + #define LCR_BLOCK_CHECKPOINT_0 '+' ///< checkpoint, not taken #define LCR_BLOCK_CHECKPOINT_1 '\'' ///< checkpoint, taken @@ -817,6 +819,15 @@ void LCR_mapGetBlockShape(uint8_t blockType, uint8_t transform, 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) + ADD(3,0,6) ADD(0,0,3) ADD(3,1,3) + ADD(0,0,3) ADD(3,0,0) ADD(3,1,3) + ADD(3,0,0) ADD(3,0,6) ADD(6,0,3) // bottom + ADD(3,0,6) ADD(3,0,0) ADD(0,0,3) // bottom + break; + case LCR_BLOCK_HILL: ADD(0,0,0) ADD(6,0,0) ADD(0,2,1) // front ADD(6,0,0) ADD(6,2,1) ADD(0,2,1) diff --git a/racing.h b/racing.h index bec9bcc..e4769d6 100644 --- a/racing.h +++ b/racing.h @@ -245,6 +245,12 @@ TPE_Vec3 _LCR_racingBlockEnvFunc(TPE_Vec3 point, const uint8_t *block) break; } + case LCR_BLOCK_BUMP: + point = TPE_envCone(point, + TPE_vec3(0,-1 * LCR_PHYSICS_UNIT / 4 ,0), + TPE_vec3(0,LCR_PHYSICS_UNIT / 6,0),(5 * LCR_PHYSICS_UNIT) / 12); + break; + case LCR_BLOCK_CORNER: case LCR_BLOCK_CORNER_12: {