Add FOV options

This commit is contained in:
Miloslav Číž 2020-10-31 13:47:50 +01:00
parent af27ff2f43
commit 4fb88d3775
3 changed files with 19 additions and 4 deletions

View File

@ -1,7 +1,5 @@
general:
- Add FOV options. RCL doesn't project sprites with different FOV correctly -
FIX!
- Profile, epsecially Pokitto, small periodical tearing can be noticed (some
periodical updates probably).
- Compile Pokitto overclocked version.
@ -220,6 +218,8 @@ done:
- automatic tests: a frontend that will play the game, check the state, rendered
frames etc.
- make SFML frontend
- Add FOV options. RCL doesn't project sprites with different FOV correctly -
FIX!
scratched:
- option for disabling wall transparency, for performance?

4
game.h
View File

@ -220,8 +220,8 @@ void SFG_init();
#define RCL_CAMERA_COLL_HEIGHT_BELOW 800
#define RCL_CAMERA_COLL_HEIGHT_ABOVE 200
#define RCL_HORIZONTAL_FOV 256
#define RCL_VERTICAL_FOV 333
#define RCL_HORIZONTAL_FOV SFG_FOV_HORIZONTAL
#define RCL_VERTICAL_FOV SFG_FOV_VERTICAL
#include "raycastlib.h"

View File

@ -85,6 +85,21 @@
#define SFG_PLAYER_TURN_SPEED 180
#endif
/**
Horizontal FOV (field of vision) in RCL_Units (1024 means 360 degrees).
*/
#ifndef SFG_FOV_HORIZONTAL
#define SFG_FOV_HORIZONTAL 256
#endif
/**
Like SFG_FOV_HORIZONTAL but for vertical angle.
*/
#ifndef SFG_FOV_VERTICAL
#define SFG_FOV_VERTICAL 330
#endif
/**
Distance, in RCL_Units, to which textures will be drawn. Textures behind this
distance will be replaced by an average constant color, which maybe can help