anarch/settings.h

158 lines
4.3 KiB
C
Raw Normal View History

2019-10-03 18:04:14 -04:00
/**
@file settings.h
This file contains settings (or setting hints) for the game. Values here can
fine tune performance vs quality and personalize the final compiled game. Some
of these settings may be overriden by the specific platform used according to
its limitations.
by Miloslav Ciz (drummyfish), 2019
Released under CC0 1.0 (https://creativecommons.org/publicdomain/zero/1.0/)
plus a waiver of all other intellectual property. The goal of this work is
be and remain completely in the public domain forever, available for any use
whatsoever.
*/
2019-09-26 15:18:44 -04:00
#ifndef _SFG_SETTINGS_H
#define _SFG_SETTINGS_H
2019-10-04 10:32:24 -04:00
/**
Target FPS (frames per second). This sets the game logic FPS and will try to
render at the same rate. If such fast rendering can't be achieved, frames will
be droped, but the game logic will still be forced to run at this speed, so
2019-10-18 07:48:24 -04:00
the game may actually become slowed down if FPS is set too high. Too high FPS
can also negatively affect game speeds which are computed as integers and
rounding errors can occur soon, so don't set this to extreme values.
2019-10-04 10:32:24 -04:00
*/
2019-09-26 15:18:44 -04:00
#define SFG_FPS 60
2019-10-04 10:32:24 -04:00
/**
Width of the screen in pixels. Set this to ACTUAL resolution. If you want the
game to run at smaller resolution (with bigger pixels), do his using
SFG_RESOLUTION_SCALEDOWN;
*/
2019-10-21 13:58:11 -04:00
#define SFG_SCREEN_RESOLUTION_X 1024
2019-10-04 10:32:24 -04:00
/**
Height of the screen in pixels. Set this to ACTUAL resolution. If you want the
game to run at smaller resolution (with bigger pixels), do his using
SFG_RESOLUTION_SCALEDOWN;
*/
2019-10-21 13:58:11 -04:00
#define SFG_SCREEN_RESOLUTION_Y 768
2019-10-04 10:32:24 -04:00
/**
How many times the screen resolution will be divided (how many times a game
pixel will be bigger than the screen pixel).
*/
2019-10-06 10:16:59 -04:00
#define SFG_RESOLUTION_SCALEDOWN 1
2019-09-26 15:18:44 -04:00
2019-10-02 06:02:52 -04:00
/**
Turn on for previes mode for map editing (flying, noclip, fast movement etc.).
*/
2019-10-02 14:31:27 -04:00
#define SFG_PREVIEW_MODE 0
2019-10-02 06:02:52 -04:00
/**
How much faster movement is in the preview mode.
*/
#define SFG_PREVIEW_MODE_SPEED_MULTIPLIER 2
2019-09-29 08:54:40 -04:00
/**
Hint as to whether run in fullscreen, if the platform allows it.
*/
#define SFG_FULLSCREEN 0
2019-09-28 15:42:02 -04:00
/**
Whether shadows (fog) should be dithered, i.e. more smooth (needs a bit more
2019-10-03 17:37:52 -04:00
CPU performance and memory).
2019-09-28 15:42:02 -04:00
*/
2019-09-26 19:25:22 -04:00
#define SFG_DITHERED_SHADOW 1
2019-09-28 15:42:02 -04:00
/**
Maximum number of squares that will be traversed by any cast ray. Smaller
number is faster but can cause visual artifacts.
*/
2019-09-27 13:04:49 -04:00
#define SFG_RAYCASTING_MAX_STEPS 30
2019-09-28 15:42:02 -04:00
/**
Maximum number of hits any cast ray will register. Smaller number is faster
but can cause visual artifacts.
*/
2019-09-27 13:04:49 -04:00
#define SFG_RAYCASTING_MAX_HITS 10
2019-09-28 15:42:02 -04:00
/**
How many times rendering should be subsampled horizontally. Bigger number
can significantly improve performance (by casting fewer rays), but can look
a little worse.
*/
#define SFG_RAYCASTING_SUBSAMPLE 1
2019-10-04 16:40:41 -04:00
/**
Enables or disables fog (darkness) due to distance. Recommended to keep on
for good look, but can be turned off for performance.
*/
#define SFG_ENABLE_FOG 1
2019-10-06 11:12:12 -04:00
/**
Says whether sprites should diminish in fog. This takes more performance but
looks better.
*/
#define SFG_DIMINISH_SPRITES 1
2019-10-09 11:44:31 -04:00
/**
How quick player head bob is, 1024 meaning once per second. 0 Means turn off
head bob.
*/
#define SFG_HEADBOB_SPEED 900
/**
Sets head bob offset, in RCL_UNITS_PER_SQUARE. 0 Means turn off head bob.
*/
#define SFG_HEADBOB_OFFSET 200
2019-10-13 20:15:13 -04:00
/**
Weapon bobbing offset in weapon image pixels.
*/
2019-10-14 10:05:49 -04:00
#define SFG_WEAPONBOB_OFFSET 4
2019-10-13 20:15:13 -04:00
2019-10-11 09:01:36 -04:00
/**
Camera shearing (looking up/down) speed, in vertical resolutions per second.
*/
#define SFG_CAMERA_SHEAR_SPEED 3
/**
Maximum camera shear (vertical angle). 1024 means 1.0 * vertical resolution.
*/
#define SFG_CAMERA_MAX_SHEAR 1024
2019-10-22 10:48:27 -04:00
/**
Specifies how quick some sprite animations are, in frames per second.
*/
#define SFG_SPRITE_ANIMATION_SPEED 4
2019-10-25 16:41:52 -04:00
/**
2019-10-25 17:17:59 -04:00
How wide the health indicator (screen border) is, in fractions of screen
width.
2019-10-25 16:41:52 -04:00
*/
2019-10-25 17:17:59 -04:00
#define SFG_HUD_HEALTH_INDICATOR_WIDTH 32
2019-10-25 16:41:52 -04:00
/**
2019-10-25 17:17:59 -04:00
For how long health indicator stays shown, in ms.
2019-10-25 16:41:52 -04:00
*/
2019-10-25 17:17:59 -04:00
#define SFG_HUD_HEALTH_INDICATOR_DURATION 500
2019-10-25 16:41:52 -04:00
2019-12-27 07:39:16 -05:00
/**
How many element (items, monsters, ...) distances will be checked per frame
for distance. Higher value may decrease performance a tiny bit, but things
will react more quickly and appear less "out of thin air".
*/
#define SFG_ELEMENT_DISTANCES_CHECKED_PER_FRAME 8
2019-12-29 15:09:50 -05:00
/**
Says the intensity of background image blur. 0 means no blur, improves
performance and lowers memory usage.
*/
#define SFG_BACKGROUND_BLUR 0
2019-09-26 15:18:44 -04:00
#endif // guard