Add horizon shift

This commit is contained in:
Miloslav Ciz 2025-01-15 22:01:50 +01:00
parent 8d0adf66eb
commit 9485a7cd95
3 changed files with 8 additions and 2 deletions

View file

@ -2,7 +2,6 @@
- replay validation
- add time slow down setting
- the horizon on background seems too low? maybe add setting to shift it a bit?
- add argc/argv to gameInit? could be used to quickly start maps, verify
replays etc.
- maybe each map could have a target time embedded: when beaten, the map would
@ -27,6 +26,7 @@
=========== HANDLED ==============
- allow stopping car rotation in air like in Trackmania
- the horizon on background seems too low? maybe add setting to shift it a bit?
- replay format
- prevent time overflow! stop incrementing level frame once it's at maximum
- car shadow? probably would have to be done as screen space effect with

View file

@ -1312,7 +1312,8 @@ void LCR_rendererDrawSky(int sky, S3L_Unit offsetH, S3L_Unit offsetV)
anchorPoint[0] += 2 * LCR_IMAGE_SIZE * LCR_SETTING_SKY_SIZE;
anchorPoint[1] =
(LCR_EFFECTIVE_RESOLUTION_Y) / 3 - // 3: we place the center a bit more up
(LCR_EFFECTIVE_RESOLUTION_Y) / 2 - // 3: we place the center a bit more up
(LCR_SETTING_HORIZON_SHIFT * LCR_EFFECTIVE_RESOLUTION_Y) / 16 -
(LCR_EFFECTIVE_RESOLUTION_Y * offsetV) / S3L_F
- LCR_IMAGE_SIZE * LCR_SETTING_SKY_SIZE;

View file

@ -204,4 +204,9 @@
#define LCR_SETTING_REPLAY_MAX_SIZE 256
#endif
#ifndef LCR_SETTING_HORIZON_SHIFT
/** Vertical offset of the background horizon, 1/16th of screen height. */
#define LCR_SETTING_HORIZON_SHIFT 5
#endif
#endif // guard