Licar/settings.h

224 lines
7 KiB
C
Raw Normal View History

2023-07-21 21:17:49 +02:00
#ifndef _LCR_SETTINGS_H
#define _LCR_SETTINGS_H
2025-01-20 21:33:05 +01:00
/*
Licar: settings
Compile times settings file for all modules, values here may be changed by the
user or overriden by frontend before compilation.
2025-01-14 13:59:44 +01:00
*/
2023-08-08 20:39:29 +02:00
#ifndef LCR_SETTING_RESOLUTION_X
2023-09-10 14:43:20 +02:00
#define LCR_SETTING_RESOLUTION_X 1024
2023-08-08 20:39:29 +02:00
#endif
#ifndef LCR_SETTING_RESOLUTION_Y
2023-09-10 14:43:20 +02:00
#define LCR_SETTING_RESOLUTION_Y 768
2023-08-08 20:39:29 +02:00
#endif
2023-09-17 13:21:19 +02:00
#ifndef LCR_SETTING_FPS
2025-01-16 15:00:13 +01:00
/** Rendering frames per second. Note this only applies to graphics, NOT
physics. */
2023-09-17 13:21:19 +02:00
#define LCR_SETTING_FPS 30
#endif
2023-09-11 20:56:04 +02:00
#ifndef LCR_SETTING_RESOLUTION_SUBDIVIDE
#define LCR_SETTING_RESOLUTION_SUBDIVIDE 1
#endif
2023-09-17 13:21:19 +02:00
#ifndef LCR_SETTING_FREE_CAMERA_SPEED
2025-01-16 15:00:13 +01:00
/** Move speed of free camera, in 1/8ths of block length. */
#define LCR_SETTING_FREE_CAMERA_SPEED 50
2023-09-17 13:21:19 +02:00
#endif
2023-09-17 15:42:46 +02:00
#ifndef LCR_SETTING_FREE_CAMERA_TURN_SPEED
2025-01-16 15:00:13 +01:00
/** Turn speed of free camera, in degrees per second. */
#define LCR_SETTING_FREE_CAMERA_TURN_SPEED 180
2023-09-17 15:42:46 +02:00
#endif
#ifndef LCR_SETTING_SKY_ROLL_MULTIPLIER_V
#define LCR_SETTING_SKY_ROLL_MULTIPLIER_V 8
#endif
#ifndef LCR_SETTING_SKY_ROLL_MULTIPLIER_H
#define LCR_SETTING_SKY_ROLL_MULTIPLIER_H 4
#endif
2024-07-22 01:16:16 +02:00
#ifndef LCR_SETTING_MAX_MAP_VERTICES
2023-09-16 20:35:01 +02:00
/** Maximum number of vertices for 3D rendering. Lower number will decrease
RAM usage but will prevent larger maps from being loaded. */
2024-07-22 01:16:16 +02:00
#define LCR_SETTING_MAX_MAP_VERTICES 10000
2023-09-16 20:35:01 +02:00
#endif
2024-07-22 01:16:16 +02:00
#ifndef LCR_SETTING_MAX_MAP_TRIANGLES
/** Like LCR_SETTING_MAX_MAP_VERTICES but for the number of triangles. */
#define LCR_SETTING_MAX_MAP_TRIANGLES 10000
2023-09-16 20:35:01 +02:00
#endif
2023-09-12 16:42:58 +02:00
#ifndef LCR_SETTING_SKY_SIZE
/** Size of sky texture pixel, 0 turns off sky rendering. */
2024-07-30 21:47:50 +02:00
#define LCR_SETTING_SKY_SIZE 4
2023-09-12 17:39:55 +02:00
#endif
2023-09-12 16:42:58 +02:00
2024-09-23 23:31:30 +02:00
#ifndef LCR_SETTING_MAP_MAX_BLOCKS
2023-07-21 21:17:49 +02:00
/** Maximum number of blocks a map can consist of, decreasing will save RAM
but also rule out loading bigger maps. */
2024-09-23 23:31:30 +02:00
#define LCR_SETTING_MAP_MAX_BLOCKS 4096
2023-07-21 21:17:49 +02:00
#endif
2024-08-02 00:05:03 +02:00
#ifndef LCR_SETTING_TRIANGLE_CULLING_PERIOD
/** This says how often (after how many triangles added) the map model
triangles will be culled. This value may affect how quickly maps load. */
#define LCR_SETTING_TRIANGLE_CULLING_PERIOD 64
#endif
2024-08-06 01:34:38 +02:00
#ifndef LCR_SETTING_TEXTURE_SUBSAMPLE
/** Sets texture subsampling: 0 means no subsampling, higher value N means a
texture will be sampled once per N rasterized pixels. Higher value can
increase performance. */
#define LCR_SETTING_TEXTURE_SUBSAMPLE 4
#endif
2024-08-13 00:53:04 +02:00
#ifndef LCR_SETTING_LOD_DISTANCE
/** Distance in game squares from which LOD will be drawn. Value 64 or higher
turns off LOD completely. Note that this doesn't affect rendering distance
of 3D models. */
#define LCR_SETTING_LOD_DISTANCE 25
#endif
2024-08-13 20:49:52 +02:00
#ifndef LCR_SETTING_LOD_COLOR
#define LCR_SETTING_LOD_COLOR 0x4229
#endif
2024-09-01 16:10:15 +02:00
#ifndef LCR_SETTING_CAR_ANIMATION_SUBDIVIDE
/** How many frames will be used to complete whole animation of the car model.
2024-09-06 00:58:32 +02:00
0 turns off car animation completely (may be faster and smaller), 1 turns on
highest quality animation, higher values lower animation quality and may
increase performance. */
2024-09-10 21:49:23 +02:00
#define LCR_SETTING_CAR_ANIMATION_SUBDIVIDE 2
2024-09-01 14:06:24 +02:00
#endif
2024-09-06 00:58:32 +02:00
#ifndef LCR_SETTING_CAMERA_HEIGHT
/** Base height of the car follow camera, in 4ths of map block height. */
2024-09-20 15:22:18 +02:00
#define LCR_SETTING_CAMERA_HEIGHT 5
2024-09-06 00:58:32 +02:00
#endif
#ifndef LCR_SETTING_CAMERA_HEIGHT_BAND
/** Size of height band of the follow camera, in same units as base height. */
2024-09-10 17:29:22 +02:00
#define LCR_SETTING_CAMERA_HEIGHT_BAND 1
2024-09-06 00:58:32 +02:00
#endif
2024-09-10 20:11:31 +02:00
#ifndef LCR_SETTING_CAMERA_DISTANCE
/** Base horizontal distance of the car follow camera, in 4ths of map block
2024-09-06 00:58:32 +02:00
width. */
2024-09-20 15:22:18 +02:00
#define LCR_SETTING_CAMERA_DISTANCE 4
2024-09-10 20:11:31 +02:00
#endif
#ifndef LCR_SETTING_CAMERA_DISTANCE_BAND
/** Band for distance of the car follow camera, in same units as base dist. */
2024-09-11 02:12:04 +02:00
#define LCR_SETTING_CAMERA_DISTANCE_BAND 2
2024-09-09 19:16:51 +02:00
#endif
#ifndef LCR_SETTING_GHOST_COLOR
/** Color of the ghost car (in RGB565). */
#define LCR_SETTING_GHOST_COLOR 0xff00
#endif
2024-10-07 22:07:58 +02:00
#ifndef LCR_SETTING_CHECKPOINT_0_COLOR
2024-10-07 15:52:39 +02:00
/** Color of untaken checkpoint (in RGB565). */
2024-10-07 22:07:58 +02:00
#define LCR_SETTING_CHECKPOINT_0_COLOR 0x37e0
2024-10-07 15:52:39 +02:00
#endif
2024-10-07 22:07:58 +02:00
#ifndef LCR_SETTING_CHECKPOINT_1_COLOR
2024-10-07 15:52:39 +02:00
/** Color of taken checkpoint (in RGB565). */
2024-10-07 22:07:58 +02:00
#define LCR_SETTING_CHECKPOINT_1_COLOR 0xdefb
2024-10-07 15:52:39 +02:00
#endif
#ifndef LCR_SETTING_FINISH_COLOR
/** Color of finish block (in RGB565). */
2024-10-07 22:07:58 +02:00
#define LCR_SETTING_FINISH_COLOR 0xf900
2024-10-07 15:52:39 +02:00
#endif
2024-09-09 19:16:51 +02:00
#ifndef LCR_SETTING_SMOOTH_ANIMATIONS
/** Whether to smooth out animations (car physics, camera movement etc.). */
#define LCR_SETTING_SMOOTH_ANIMATIONS 1
2024-09-06 00:58:32 +02:00
#endif
2024-09-27 00:08:52 +02:00
#ifndef LCR_SETTING_LOG_LEVEL
/** How detailed the console logs should be. 0 turns off logging, 1 means
normal, 2 more detailed etc. Setting high log level may result in spam and
slower game, but is useful for debugging. */
#define LCR_SETTING_LOG_LEVEL 1
#endif
2025-01-15 23:24:07 +01:00
#ifndef LCR_SETTING_CMS_PER_BLOCK
/** How many centimeters one game block is considered to measure
(horizontally). This is for calculating speed etc. */
#define LCR_SETTING_CMS_PER_BLOCK 400
2024-12-17 21:39:32 +01:00
#endif
2024-12-18 00:18:31 +01:00
#ifndef LCR_SETTING_DEBUG_PHYSICS_DRAW
/** If on, physics world will be drawn. */
#define LCR_SETTING_DEBUG_PHYSICS_DRAW 0
#endif
2024-12-18 18:40:03 +01:00
#ifndef LCR_SETTING_POTATO_GRAPHICS
/** Setting this will turn on very simple graphics without textures and etc.,
can be good for very weak devices. */
#define LCR_SETTING_POTATO_GRAPHICS 0
#endif
2024-12-23 22:50:07 +01:00
#ifndef LCR_SETTING_MUSIC
/** Whether to enable in game music. */
#define LCR_SETTING_MUSIC 1
#endif
2024-12-30 00:49:41 +01:00
#ifndef LCR_SETTING_ENABLE_RESOURCE_FILE
/** May be used to disable using the user resource file. */
#define LCR_SETTING_ENABLE_RESOURCE_FILE 1
#endif
2025-01-01 01:23:43 +01:00
#ifndef LCR_SETTING_COUNTDOWN_SECONDS
/** Run start countdown length in seconds. */
2025-01-07 22:57:28 +01:00
#define LCR_SETTING_COUNTDOWN_SECONDS 1 // for release make 3
2025-01-01 01:23:43 +01:00
#endif
2025-01-08 21:28:01 +01:00
#ifndef LCR_SETTING_MAP_CHUNK_RELOAD_INTERVAL
/** Interval in rendering frames of reloading map chunks, should ideally be
kept a power of two, can't be 0. */
#define LCR_SETTING_MAP_CHUNK_RELOAD_INTERVAL 16
#endif
2025-01-11 20:11:22 +01:00
#ifndef LCR_SETTING_REPLAY_MAX_SIZE
/** Says the maximum size of a replay (in replay events). The value 0 will
turn replays off completely. */
#define LCR_SETTING_REPLAY_MAX_SIZE 256
#endif
2025-01-15 22:01:50 +01:00
#ifndef LCR_SETTING_HORIZON_SHIFT
2025-01-15 23:24:07 +01:00
/** Vertical offset of the background horizon in percents of screen height. */
#define LCR_SETTING_HORIZON_SHIFT 30
#endif
#ifndef LCR_SETTING_TIME_MULTIPLIER
/** Multiplies speed of time by this percentage, doesn't affect physics. */
#define LCR_SETTING_TIME_MULTIPLIER 100
2025-01-15 22:01:50 +01:00
#endif
2025-01-21 22:46:56 +01:00
#ifndef LCR_SETTING_GHOST_STEP
/** Step (in physics engine ticks) by which the samples for ghost car will be
spaced (positions inbetween will be interpolated). Lower step along with more
ghost samples should result in more accurate ghost animation, but will eat up
more memory. This should ideally be kept a power of two. */
#define LCR_SETTING_GHOST_STEP 16
#endif
#ifndef LCR_SETTING_GHOST_MAX_SAMPLES
/** Maximum number of samples the ghost car will be able to use. Higher value
should generally result in more accurate ghost animation, but will eat up more
memory. Value 0 disables ghosts. */
#define LCR_SETTING_GHOST_MAX_SAMPLES 128
#endif
2023-07-21 21:17:49 +02:00
#endif // guard