1
0
Fork 0

Norman Vine:

Attached patch gets rid of all mention of GLUT from the cockpit directory.
This commit is contained in:
curt 2003-08-12 15:57:17 +00:00
parent bcb10efa50
commit 0179cab894
9 changed files with 41 additions and 47 deletions

View file

@ -29,8 +29,6 @@
# include <windows.h> # include <windows.h>
#endif #endif
#include <GL/gl.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>

View file

@ -40,7 +40,6 @@
#include <math.h> #include <math.h>
#include <GL/glut.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> // char related functions #include <stdio.h> // char related functions
#include <string.h> // strcmp() #include <string.h> // strcmp()

View file

@ -38,7 +38,6 @@
# include <windows.h> # include <windows.h>
#endif #endif
#include <GL/glut.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

View file

@ -2,9 +2,9 @@
#include "hud.hxx" #include "hud.hxx"
#ifdef USE_HUD_TextList #ifdef USE_HUD_TextList
#define textString( x , y, text, font,digit) TextString( text, x , y ,digit ) //suma #define textString( x , y, text, digit) TextString( text, x , y ,digit ) //suma
#else #else
#define textString( x , y, text, font,digit ) puDrawString ( guiFnt, text, x, y ); //suma #define textString( x , y, text, digit ) puDrawString ( guiFnt, text, x, y ); //suma
#endif #endif
//========== Top of hud_card class member definitions ============= //========== Top of hud_card class member definitions =============
@ -234,11 +234,11 @@ draw( void ) // (HUD_scale * pscale )
int l = abs((int)theta); int l = abs((int)theta);
if (l) { if (l) {
if( l<10) if( l<10)
textString (x,y,TextScale,GLUT_BITMAP_8_BY_13,0 ); textString (x,y,TextScale,0 );
else if(l<100) else if(l<100)
textString (x-1.0,y,TextScale,GLUT_BITMAP_8_BY_13,0 ); textString (x-1.0,y,TextScale,0 );
else if( l<360 ) else if( l<360 )
textString (x-2.0,y,TextScale,GLUT_BITMAP_8_BY_13,0 ); textString (x-2.0,y,TextScale,0 );
} }
} }
@ -584,7 +584,7 @@ draw( void ) // (HUD_scale * pscale )
if( !huds_notext(options)) { if( !huds_notext(options)) {
textString ( marker_xs + 2, marker_ys, textString ( marker_xs + 2, marker_ys,
TextScale, GLUT_BITMAP_8_BY_13,0 ); TextScale,0 );
} }
} else { } else {
//begin suma //begin suma
@ -601,11 +601,11 @@ draw( void ) // (HUD_scale * pscale )
if( huds_left(options) ) { if( huds_left(options) ) {
textString( marker_xs - 8 * lenstr - 2, textString( marker_xs - 8 * lenstr - 2,
marker_ys - 4, marker_ys - 4,
TextScale, GLUT_BITMAP_8_BY_13,0 ); TextScale, 0 );
} else { } else {
textString( marker_xe + 3 * lenstr, textString( marker_xe + 3 * lenstr,
marker_ys - 4, marker_ys - 4,
TextScale, GLUT_BITMAP_8_BY_13,0 ); TextScale, 0 );
} //End if huds_left } //End if huds_left
} //End if !huds_notext } //End if !huds_notext
} //End if huds-both } //End if huds-both
@ -844,7 +844,7 @@ draw( void ) // (HUD_scale * pscale )
if( !huds_notext(options) ) { if( !huds_notext(options) ) {
textString ( marker_xs - 4 * lenstr, textString ( marker_xs - 4 * lenstr,
marker_ys + 4, marker_ys + 4,
TextScale, GLUT_BITMAP_8_BY_13,0 ); //suma TextScale, 0 ); //suma
} }
} else { } else {
drawOneLine( marker_xs, marker_ys, drawOneLine( marker_xs, marker_ys,
@ -853,11 +853,11 @@ draw( void ) // (HUD_scale * pscale )
if( huds_top(options) ) { if( huds_top(options) ) {
textString ( marker_xs - 4 * lenstr, textString ( marker_xs - 4 * lenstr,
height - 10, height - 10,
TextScale, GLUT_BITMAP_8_BY_13,0 ); //suma TextScale, 0 ); //suma
} else { } else {
textString( marker_xs - 4 * lenstr, textString( marker_xs - 4 * lenstr,
scrn_rect.top, scrn_rect.top,
TextScale, GLUT_BITMAP_8_BY_13,0 ); //suma TextScale, 0 ); //suma
} }
} }
} }
@ -1000,7 +1000,7 @@ zoomed_scale(int first, int last)
sprintf(TextScale,"%3.0f\n",(float)(data[centre] * data_scaling())); sprintf(TextScale,"%3.0f\n",(float)(data[centre] * data_scaling()));
if( !huds_notext(options)) { if( !huds_notext(options)) {
textString (x, ycentre, TextScale, GLUT_BITMAP_8_BY_13,0 ); textString (x, ycentre, TextScale, 0 );
} }
for(i=1;i<5;i++) { for(i=1;i<5;i++) {
@ -1019,12 +1019,12 @@ zoomed_scale(int first, int last)
sprintf(TextScale,"%3.0f\n",(float)(data[centre-i-1] * data_scaling())); sprintf(TextScale,"%3.0f\n",(float)(data[centre-i-1] * data_scaling()));
if( !huds_notext(options)) if( !huds_notext(options))
textString (x, yfirst, TextScale, GLUT_BITMAP_8_BY_13,0 ); textString (x, yfirst, TextScale, 0 );
sprintf(TextScale,"%3.0f\n",(float)(data[centre+i+1] * data_scaling())); sprintf(TextScale,"%3.0f\n",(float)(data[centre+i+1] * data_scaling()));
if( !huds_notext(options)) if( !huds_notext(options))
textString (x, ysecond, TextScale, GLUT_BITMAP_8_BY_13,0 ); textString (x, ysecond, TextScale, 0 );
yfirst -= factors; yfirst -= factors;
@ -1052,7 +1052,7 @@ zoomed_scale(int first, int last)
sprintf(TextScale,"%3.0f\n",(float)(data[centre] * data_scaling())); sprintf(TextScale,"%3.0f\n",(float)(data[centre] * data_scaling()));
if( !huds_notext(options)) { if( !huds_notext(options)) {
textString (w, ycentre, TextScale, GLUT_BITMAP_8_BY_13,0 ); textString (w, ycentre, TextScale, 0 );
} }
for(i=1;i<5;i++) { for(i=1;i<5;i++) {
@ -1071,12 +1071,12 @@ zoomed_scale(int first, int last)
sprintf(TextScale,"%3.0f\n",(float)(data[centre-i-1] * data_scaling())); sprintf(TextScale,"%3.0f\n",(float)(data[centre-i-1] * data_scaling()));
if( !huds_notext(options)) if( !huds_notext(options))
textString (w, yfirst, TextScale, GLUT_BITMAP_8_BY_13,0 ); textString (w, yfirst, TextScale, 0 );
sprintf(TextScale,"%3.0f\n",(float)(data[centre+i+1] * data_scaling())); sprintf(TextScale,"%3.0f\n",(float)(data[centre+i+1] * data_scaling()));
if( !huds_notext(options)) if( !huds_notext(options))
textString (w, ysecond, TextScale, GLUT_BITMAP_8_BY_13,0 ); textString (w, ysecond, TextScale, 0 );
yfirst -= factors; yfirst -= factors;
ysecond += factors; ysecond += factors;
@ -1166,7 +1166,7 @@ zoomed_scale(int first, int last)
sprintf(TextScale,"%3.0f\n",(float)(data[centre] * data_scaling())); sprintf(TextScale,"%3.0f\n",(float)(data[centre] * data_scaling()));
if( !huds_notext(options)) { if( !huds_notext(options)) {
textString (xcentre-10.0, y, TextScale, GLUT_BITMAP_8_BY_13,0 ); textString (xcentre-10.0, y, TextScale, 0 );
} }
for(i=1;i<5;i++) { for(i=1;i<5;i++) {
@ -1185,12 +1185,12 @@ zoomed_scale(int first, int last)
sprintf(TextScale,"%3.0f\n",(float)(data[centre-i-1] * data_scaling())); sprintf(TextScale,"%3.0f\n",(float)(data[centre-i-1] * data_scaling()));
if( !huds_notext(options)) if( !huds_notext(options))
textString (xfirst-10.0, y, TextScale, GLUT_BITMAP_8_BY_13,0 ); textString (xfirst-10.0, y, TextScale, 0 );
sprintf(TextScale,"%3.0f\n",(float)(data[centre+i+1] * data_scaling())); sprintf(TextScale,"%3.0f\n",(float)(data[centre+i+1] * data_scaling()));
if( !huds_notext(options)) if( !huds_notext(options))
textString (xsecond-10.0, y, TextScale, GLUT_BITMAP_8_BY_13,0 ); textString (xsecond-10.0, y, TextScale, 0 );
xfirst -= factors; xfirst -= factors;
@ -1219,7 +1219,7 @@ zoomed_scale(int first, int last)
sprintf(TextScale,"%3.0f\n",(float)(data[centre] * data_scaling())); sprintf(TextScale,"%3.0f\n",(float)(data[centre] * data_scaling()));
if( !huds_notext(options)) { if( !huds_notext(options)) {
textString (xcentre-10.0, h, TextScale, GLUT_BITMAP_8_BY_13,0 ); textString (xcentre-10.0, h, TextScale, 0 );
} }
for(i=1;i<5;i++) { for(i=1;i<5;i++) {
@ -1238,12 +1238,12 @@ zoomed_scale(int first, int last)
sprintf(TextScale,"%3.0f\n",(float)(data[centre-i-1] * data_scaling())); sprintf(TextScale,"%3.0f\n",(float)(data[centre-i-1] * data_scaling()));
if( !huds_notext(options)) if( !huds_notext(options))
textString (xfirst-10.0,h, TextScale, GLUT_BITMAP_8_BY_13,0 ); textString (xfirst-10.0,h, TextScale, 0 );
sprintf(TextScale,"%3.0f\n",(float)(data[centre+i+1] * data_scaling())); sprintf(TextScale,"%3.0f\n",(float)(data[centre+i+1] * data_scaling()));
if( !huds_notext(options)) if( !huds_notext(options))
textString (xsecond-10.0,h, TextScale, GLUT_BITMAP_8_BY_13,0 ); textString (xsecond-10.0,h, TextScale, 0 );
xfirst -= factors; xfirst -= factors;

View file

@ -3,9 +3,9 @@
#ifdef USE_HUD_TextList #ifdef USE_HUD_TextList
#define textString( x , y, text, font,digit ) TextString( text, x , y,digit ) //suma #define textString( x , y, text, digit ) TextString( text, x , y,digit ) //suma
#else #else
#define textString( x , y, text, font,digit ) puDrawString ( guiFnt, text, x, y ); //suma #define textString( x , y, text, digit ) puDrawString ( guiFnt, text, x, y ); //suma
#endif #endif
//============== Top of gauge_instr class member definitions ============== //============== Top of gauge_instr class member definitions ==============
@ -214,7 +214,7 @@ void gauge_instr :: draw (void)
} }
// Now we know where to put the text. // Now we know where to put the text.
text_y = marker_ys; text_y = marker_ys;
textString( text_x, text_y, TextScale, GLUT_BITMAP_8_BY_13,0 ); //suma textString( text_x, text_y, TextScale, 0 ); //suma
} }
} }
} // } //
@ -350,7 +350,7 @@ void gauge_instr :: draw (void)
if( !huds_notext(options) ) { if( !huds_notext(options) ) {
textString ( marker_xs - lenstr, marker_ys + 4, textString ( marker_xs - lenstr, marker_ys + 4,
TextScale, GLUT_BITMAP_8_BY_13 ,0); //suma TextScale ,0); //suma
} }
} }
else { else {
@ -361,11 +361,11 @@ void gauge_instr :: draw (void)
if( huds_top(options) ) { if( huds_top(options) ) {
textString ( marker_xs - lenstr, textString ( marker_xs - lenstr,
height - 10, height - 10,
TextScale, GLUT_BITMAP_8_BY_13,0 ); //suma TextScale, 0 ); //suma
} }
else { else {
textString( marker_xs - lenstr, scrn_rect.top, textString( marker_xs - lenstr, scrn_rect.top,
TextScale, GLUT_BITMAP_8_BY_13,0 ); //suma TextScale, 0 ); //suma
} }
} }
} }

View file

@ -3,9 +3,9 @@
#ifdef USE_HUD_TextList #ifdef USE_HUD_TextList
#define textString( x , y, text, font,digit ) TextString( text, x , y,digit ) //suma #define textString( x , y, text, digit ) TextString( text, x , y,digit ) //suma
#else #else
#define textString( x , y, text, font,digit ) puDrawString ( guiFnt, text, x, y ); //suma #define textString( x , y, text, digit ) puDrawString ( guiFnt, text, x, y ); //suma
#endif #endif
//======================= Top of instr_label class ========================= //======================= Top of instr_label class =========================
@ -189,12 +189,12 @@ draw( void ) // Required method in base class
if( fontSize == HUD_FONT_SMALL ) { if( fontSize == HUD_FONT_SMALL ) {
textString( scrn_rect.left + posincr, scrn_rect.top, textString( scrn_rect.left + posincr, scrn_rect.top,
label_buffer, GLUT_BITMAP_8_BY_13 ,get_digits()); //suma label_buffer, get_digits()); //suma
} }
else { else {
if( fontSize == HUD_FONT_LARGE ) { if( fontSize == HUD_FONT_LARGE ) {
textString( scrn_rect.left + posincr, scrn_rect.top, textString( scrn_rect.left + posincr, scrn_rect.top,
label_buffer, GLUT_BITMAP_9_BY_15 ,get_digits()); //suma label_buffer, get_digits()); //suma
} }
} }
} }

View file

@ -3,9 +3,9 @@
#ifdef USE_HUD_TextList #ifdef USE_HUD_TextList
#define textString( x , y, text, font,digit ) TextString( text, x , y,digit ) //suma #define textString( x , y, text, digit ) TextString( text, x , y,digit ) //suma
#else #else
#define textString( x , y, text, font,digit ) puDrawString ( guiFnt, text, x, y ); //suma #define textString( x , y, text, digit ) puDrawString ( guiFnt, text, x, y ); //suma
#endif #endif
//======================= Top of instr_label class ========================= //======================= Top of instr_label class =========================
@ -138,12 +138,12 @@ draw( void ) // Required method in base class
if( fontSize == HUD_FONT_SMALL ) { if( fontSize == HUD_FONT_SMALL ) {
textString( scrn_rect.left + posincr, scrn_rect.top, textString( scrn_rect.left + posincr, scrn_rect.top,
label_buffer, GLUT_BITMAP_8_BY_13, get_digits()); //suma label_buffer, get_digits()); //suma
} }
else { else {
if( fontSize == HUD_FONT_LARGE ) { if( fontSize == HUD_FONT_LARGE ) {
textString( scrn_rect.left + posincr, scrn_rect.top, textString( scrn_rect.left + posincr, scrn_rect.top,
label_buffer, GLUT_BITMAP_9_BY_15,get_digits()); //suma label_buffer, get_digits()); //suma
} }
} }
} }

View file

@ -3,9 +3,9 @@
#ifdef USE_HUD_TextList #ifdef USE_HUD_TextList
#define textString( x , y, text, font,digit ) TextString( text, x , y,digit ) //suma #define textString( x , y, text, digit ) TextString( text, x , y,digit ) //suma
#else #else
#define textString( x , y, text, font,digit ) puDrawString ( guiFnt, text, x, y ); //suma #define textString( x , y, text, digit ) puDrawString ( guiFnt, text, x, y ); //suma
#endif #endif
//======================= Top of instr_label class ========================= //======================= Top of instr_label class =========================
@ -141,12 +141,12 @@ draw( void ) // Required method in base class
if( fontSize == HUD_FONT_SMALL ) { if( fontSize == HUD_FONT_SMALL ) {
textString( scrn_rect.left + posincr, scrn_rect.top, textString( scrn_rect.left + posincr, scrn_rect.top,
label_buffer, GLUT_BITMAP_8_BY_13, get_digits()); //suma label_buffer, get_digits()); //suma
} }
else { else {
if( fontSize == HUD_FONT_LARGE ) { if( fontSize == HUD_FONT_LARGE ) {
textString( scrn_rect.left + posincr, scrn_rect.top, textString( scrn_rect.left + posincr, scrn_rect.top,
label_buffer, GLUT_BITMAP_9_BY_15, get_digits()); //suma label_buffer, get_digits()); //suma
} }
} }
} }

View file

@ -36,8 +36,6 @@
# include <windows.h> # include <windows.h>
#endif #endif
#include <GL/gl.h>
#include <plib/ssg.h> #include <plib/ssg.h>
#include <simgear/math/interpolater.hxx> #include <simgear/math/interpolater.hxx>