From fb69df5880d6d8266ad7cea70662e8922ecd8183 Mon Sep 17 00:00:00 2001 From: curt Date: Sat, 16 May 1998 13:05:21 +0000 Subject: [PATCH] Added limits to fov. --- Main/GLUTkey.cxx | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/Main/GLUTkey.cxx b/Main/GLUTkey.cxx index 3b1e27d8f..59e37b7f6 100644 --- a/Main/GLUTkey.cxx +++ b/Main/GLUTkey.cxx @@ -108,6 +108,9 @@ void GLUTkey(unsigned char k, int x, int y) { return; case 88: /* X key */ o->fov *= 1.05; + if ( o->fov > FG_FOV_MAX ) { + o->fov = FG_FOV_MAX; + } return; case 90: /* Z key */ w->visibility /= 1.10; @@ -173,6 +176,9 @@ void GLUTkey(unsigned char k, int x, int y) { return; case 120: /* X key */ o->fov /= 1.05; + if ( o->fov < FG_FOV_MIN ) { + o->fov = FG_FOV_MIN; + } return; case 122: /* z key */ w->visibility *= 1.10; @@ -274,13 +280,16 @@ void GLUTspecialkey(int k, int x, int y) { /* $Log$ -/* Revision 1.8 1998/05/13 18:29:56 curt -/* Added a keyboard binding to dynamically adjust field of view. -/* Added a command line option to specify fov. -/* Adjusted terrain color. -/* Root path info moved to fgOPTIONS. -/* Added ability to parse options out of a config file. +/* Revision 1.9 1998/05/16 13:05:21 curt +/* Added limits to fov. /* + * Revision 1.8 1998/05/13 18:29:56 curt + * Added a keyboard binding to dynamically adjust field of view. + * Added a command line option to specify fov. + * Adjusted terrain color. + * Root path info moved to fgOPTIONS. + * Added ability to parse options out of a config file. + * * Revision 1.7 1998/05/07 23:14:14 curt * Added "D" key binding to set autopilot heading. * Made frame rate calculation average out over last 10 frames. -- 2.39.2