1
0
Fork 0

Fixed a couple items for Norman's large resolution print routines.

This commit is contained in:
curt 2001-06-13 20:31:49 +00:00
parent 6420088452
commit 46b82360b0
5 changed files with 19 additions and 3 deletions

View file

@ -964,6 +964,12 @@ static void set_hud_color(float r, float g, float b) {
// all C++.
//
void fgUpdateHUD( void ) {
fgUpdateHUD( 0.0f, 0.0f, 640.0f, 480.0f );
}
void fgUpdateHUD( GLfloat x_start, GLfloat y_start,
GLfloat x_end, GLfloat y_end )
{
int brightness;
// int day_night_sw = current_aircraft.controls->day_night_switch;
int day_night_sw = global_day_night_switch;
@ -987,7 +993,7 @@ void fgUpdateHUD( void ) {
glPushMatrix();
glLoadIdentity();
gluOrtho2D(0, 640, 0, 480);
gluOrtho2D(x_start, x_end, y_start, y_end);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();

View file

@ -907,6 +907,8 @@ extern void HUD_brightkey( bool incr_bright );
extern int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ );
extern int fgHUDInit2( fgAIRCRAFT * /* current_aircraft */ );
extern void fgUpdateHUD( void );
extern void fgUpdateHUD( GLfloat x_start, GLfloat y_start,
GLfloat x_end, GLfloat y_end );
extern void drawOneLine ( UINT x1, UINT y1, UINT x2, UINT y2);
extern void drawOneLine ( RECT &rect);

View file

@ -208,8 +208,14 @@ FGPanel::unbind ()
/**
* Update the panel.
*/
void FGPanel::update ()
{
update(_winx, _winw, _winy, _winh);
}
void
FGPanel::update ()
FGPanel::update (GLfloat winx, GLfloat winw, GLfloat winy, GLfloat winh)
{
// Do nothing if the panel isn't visible.
if (!fgPanelVisible())
@ -228,7 +234,7 @@ FGPanel::update ()
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
gluOrtho2D(_winx, _winx + _winw, _winy, _winy + _winh);
gluOrtho2D(winx, winx + winw, winy, winy + winh);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();

View file

@ -133,6 +133,7 @@ public:
virtual void bind ();
virtual void unbind ();
virtual void update ();
virtual void update (GLfloat winx, GLfloat winw, GLfloat winy, GLfloat winh);
// transfer pointer ownership!!!
virtual void addInstrument (FGPanelInstrument * instrument);

View file

@ -200,6 +200,7 @@ void FGNewMat::dump_info () {
FGNewMat::~FGNewMat ( void ) {
}
istream&
operator >> ( istream& in, FGNewMat& m )
{