mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Add fov cvar
# Conflicts: # source/exhumed/src/config.cpp # source/exhumed/src/osdcmds.cpp
This commit is contained in:
parent
82767751a7
commit
1b0a036995
4 changed files with 10 additions and 0 deletions
|
@ -26,6 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "control.h"
|
||||
#include "exhumed.h"
|
||||
#include "typedefs.h"
|
||||
#include "view.h"
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "exhumed.h"
|
||||
#include "config.h"
|
||||
#include "osdcmds.h"
|
||||
#include "view.h"
|
||||
|
||||
BEGIN_PS_NS
|
||||
|
||||
|
|
|
@ -73,6 +73,8 @@ short besttarget;
|
|||
short nViewLeft;
|
||||
short bCamera = kFalse;
|
||||
|
||||
int gFov;
|
||||
|
||||
short nViewy;
|
||||
|
||||
int viewz;
|
||||
|
@ -509,12 +511,16 @@ void DrawView(int smoothRatio)
|
|||
static uint8_t sectorCeilingPal[MAXSECTORS];
|
||||
static uint8_t wallPal[MAXWALLS];
|
||||
int const viewingRange = viewingrange;
|
||||
int const vr = Blrintf(65536.f * tanf(gFov * (fPI / 360.f)));
|
||||
|
||||
if (r_usenewaspect)
|
||||
{
|
||||
newaspect_enable = 1;
|
||||
videoSetCorrectedAspect();
|
||||
renderSetAspect(mulscale16(vr, viewingrange), yxaspect);
|
||||
}
|
||||
else
|
||||
renderSetAspect(vr, yxaspect);
|
||||
|
||||
if (HavePLURemap())
|
||||
{
|
||||
|
|
|
@ -60,6 +60,8 @@ extern short bTouchFloor;
|
|||
|
||||
extern short nChunkTotal;
|
||||
|
||||
extern int gFov;
|
||||
|
||||
static inline int angle_interpolate16(int a, int b, int smooth)
|
||||
{
|
||||
return a + mulscale16(((b+1024-a)&2047)-1024, smooth);
|
||||
|
|
Loading…
Reference in a new issue