1 /**************************************************************************
2 * tkglkey.c -- handle tkgl keyboard events
4 * Written by Curtis Olson, started May 1997.
7 * (Log is kept at end of this file)
8 **************************************************************************/
16 #include "../aircraft/aircraft.h"
18 extern double fogDensity;
20 /* Handle keyboard events */
21 void GLUTkey(unsigned char k, int x, int y) {
22 struct control_params *c;
24 c = ¤t_aircraft.controls;
26 printf("Key hit = %d\n", k);
44 case 2 /* TK_PGDWN */:
48 c->throttle[0] -= 0.05;
51 c->throttle[0] += 0.05;
55 glFogf(GL_FOG_DENSITY, fogDensity);
56 printf("Fog density = %.4f\n", fogDensity);
60 glFogf(GL_FOG_DENSITY, fogDensity);
61 printf("Fog density = %.4f\n", fogDensity);
71 /* Revision 1.2 1997/05/23 00:35:12 curt
72 /* Trying to get fog to work ...
74 * Revision 1.1 1997/05/21 15:57:50 curt
75 * Renamed due to added GLUT support.
77 * Revision 1.2 1997/05/19 18:22:41 curt
78 * Parameter tweaking ... starting to stub in fog support.
80 * Revision 1.1 1997/05/16 16:05:51 curt