From 4fb88d37759b6d4b1202df698486386fe955b98d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Sat, 31 Oct 2020 13:47:50 +0100 Subject: [PATCH] Add FOV options --- TODO.txt | 4 ++-- game.h | 4 ++-- settings.h | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/TODO.txt b/TODO.txt index 59b17ea..7109d33 100644 --- a/TODO.txt +++ b/TODO.txt @@ -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? diff --git a/game.h b/game.h index 0e32ee7..7676678 100755 --- a/game.h +++ b/game.h @@ -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" diff --git a/settings.h b/settings.h index 4846ccb..83ea8d6 100644 --- a/settings.h +++ b/settings.h @@ -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