Various Irix compiler tweaks.
This commit is contained in:
parent
f149bcba97
commit
b1027c7b6a
8 changed files with 30 additions and 16 deletions
|
@ -26,6 +26,7 @@
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
|
|
||||||
#include <stdlib.h> // atoi()
|
#include <stdlib.h> // atoi()
|
||||||
|
#include <stdio.h> // sprintf
|
||||||
#include <string>
|
#include <string>
|
||||||
SG_USING_STD(string);
|
SG_USING_STD(string);
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
|
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h> //char related functions
|
||||||
#include STL_STRING
|
#include STL_STRING
|
||||||
#include STL_FSTREAM
|
#include STL_FSTREAM
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h> // sprintf
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <plib/ssg.h>
|
#include <plib/ssg.h>
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h> // snprintf
|
||||||
|
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
#include <simgear/math/sg_random.h>
|
#include <simgear/math/sg_random.h>
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,10 @@ FGExternal::~FGExternal() {
|
||||||
// for each subsequent iteration through the EOM
|
// for each subsequent iteration through the EOM
|
||||||
void FGExternal::init() {
|
void FGExternal::init() {
|
||||||
// cout << "FGExternal::init()" << endl;
|
// cout << "FGExternal::init()" << endl;
|
||||||
|
|
||||||
|
// Explicitly call the superclass's
|
||||||
|
// init method first.
|
||||||
|
common_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,10 @@ FGExternalNet::~FGExternalNet() {
|
||||||
// for each subsequent iteration through the EOM
|
// for each subsequent iteration through the EOM
|
||||||
void FGExternalNet::init() {
|
void FGExternalNet::init() {
|
||||||
// cout << "FGExternalNet::init()" << endl;
|
// cout << "FGExternalNet::init()" << endl;
|
||||||
|
|
||||||
|
// Explicitly call the superclass's
|
||||||
|
// init method first.
|
||||||
|
common_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -697,6 +697,7 @@ bool FGATC610x::do_radio_switches() {
|
||||||
bool FGATC610x::do_radio_display() {
|
bool FGATC610x::do_radio_display() {
|
||||||
|
|
||||||
char digits[10];
|
char digits[10];
|
||||||
|
int i;
|
||||||
|
|
||||||
if ( dme_switch != 0 ) {
|
if ( dme_switch != 0 ) {
|
||||||
// DME minutes
|
// DME minutes
|
||||||
|
@ -705,7 +706,7 @@ bool FGATC610x::do_radio_display() {
|
||||||
minutes = 999.0;
|
minutes = 999.0;
|
||||||
}
|
}
|
||||||
sprintf(digits, "%03.0f", minutes);
|
sprintf(digits, "%03.0f", minutes);
|
||||||
for ( int i = 0; i < 6; ++i ) {
|
for ( i = 0; i < 6; ++i ) {
|
||||||
digits[i] -= '0';
|
digits[i] -= '0';
|
||||||
}
|
}
|
||||||
radio_display_data[0] = digits[1] << 4 | digits[2];
|
radio_display_data[0] = digits[1] << 4 | digits[2];
|
||||||
|
@ -717,7 +718,7 @@ bool FGATC610x::do_radio_display() {
|
||||||
knots = 999.0;
|
knots = 999.0;
|
||||||
}
|
}
|
||||||
sprintf(digits, "%03.0f", knots);
|
sprintf(digits, "%03.0f", knots);
|
||||||
for ( int i = 0; i < 6; ++i ) {
|
for ( i = 0; i < 6; ++i ) {
|
||||||
digits[i] -= '0';
|
digits[i] -= '0';
|
||||||
}
|
}
|
||||||
radio_display_data[2] = digits[1] << 4 | digits[2];
|
radio_display_data[2] = digits[1] << 4 | digits[2];
|
||||||
|
@ -729,7 +730,7 @@ bool FGATC610x::do_radio_display() {
|
||||||
nm = 99.0;
|
nm = 99.0;
|
||||||
}
|
}
|
||||||
sprintf(digits, "%04.1f", nm);
|
sprintf(digits, "%04.1f", nm);
|
||||||
for ( int i = 0; i < 6; ++i ) {
|
for ( i = 0; i < 6; ++i ) {
|
||||||
digits[i] -= '0';
|
digits[i] -= '0';
|
||||||
}
|
}
|
||||||
radio_display_data[4] = digits[1] << 4 | digits[3];
|
radio_display_data[4] = digits[1] << 4 | digits[3];
|
||||||
|
@ -738,7 +739,7 @@ bool FGATC610x::do_radio_display() {
|
||||||
// display turns on the decimal point
|
// display turns on the decimal point
|
||||||
} else {
|
} else {
|
||||||
// blank dem display
|
// blank dem display
|
||||||
for ( int i = 0; i < 6; ++i ) {
|
for ( i = 0; i < 6; ++i ) {
|
||||||
radio_display_data[i] = 0xff;
|
radio_display_data[i] = 0xff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -749,7 +750,7 @@ bool FGATC610x::do_radio_display() {
|
||||||
com1_stby = 0.0;
|
com1_stby = 0.0;
|
||||||
}
|
}
|
||||||
sprintf(digits, "%06.3f", com1_stby);
|
sprintf(digits, "%06.3f", com1_stby);
|
||||||
for ( int i = 0; i < 6; ++i ) {
|
for ( i = 0; i < 6; ++i ) {
|
||||||
digits[i] -= '0';
|
digits[i] -= '0';
|
||||||
}
|
}
|
||||||
radio_display_data[6] = digits[4] << 4 | digits[5];
|
radio_display_data[6] = digits[4] << 4 | digits[5];
|
||||||
|
@ -762,7 +763,7 @@ bool FGATC610x::do_radio_display() {
|
||||||
com1 = 0.0;
|
com1 = 0.0;
|
||||||
}
|
}
|
||||||
sprintf(digits, "%06.3f", com1);
|
sprintf(digits, "%06.3f", com1);
|
||||||
for ( int i = 0; i < 6; ++i ) {
|
for ( i = 0; i < 6; ++i ) {
|
||||||
digits[i] -= '0';
|
digits[i] -= '0';
|
||||||
}
|
}
|
||||||
radio_display_data[9] = digits[4] << 4 | digits[5];
|
radio_display_data[9] = digits[4] << 4 | digits[5];
|
||||||
|
@ -777,7 +778,7 @@ bool FGATC610x::do_radio_display() {
|
||||||
com2_stby = 0.0;
|
com2_stby = 0.0;
|
||||||
}
|
}
|
||||||
sprintf(digits, "%06.3f", com2_stby);
|
sprintf(digits, "%06.3f", com2_stby);
|
||||||
for ( int i = 0; i < 6; ++i ) {
|
for ( i = 0; i < 6; ++i ) {
|
||||||
digits[i] -= '0';
|
digits[i] -= '0';
|
||||||
}
|
}
|
||||||
radio_display_data[18] = digits[4] << 4 | digits[5];
|
radio_display_data[18] = digits[4] << 4 | digits[5];
|
||||||
|
@ -790,7 +791,7 @@ bool FGATC610x::do_radio_display() {
|
||||||
com2 = 0.0;
|
com2 = 0.0;
|
||||||
}
|
}
|
||||||
sprintf(digits, "%06.3f", com2);
|
sprintf(digits, "%06.3f", com2);
|
||||||
for ( int i = 0; i < 6; ++i ) {
|
for ( i = 0; i < 6; ++i ) {
|
||||||
digits[i] -= '0';
|
digits[i] -= '0';
|
||||||
}
|
}
|
||||||
radio_display_data[21] = digits[4] << 4 | digits[5];
|
radio_display_data[21] = digits[4] << 4 | digits[5];
|
||||||
|
@ -805,7 +806,7 @@ bool FGATC610x::do_radio_display() {
|
||||||
nav1_stby = 0.0;
|
nav1_stby = 0.0;
|
||||||
}
|
}
|
||||||
sprintf(digits, "%06.2f", nav1_stby);
|
sprintf(digits, "%06.2f", nav1_stby);
|
||||||
for ( int i = 0; i < 6; ++i ) {
|
for ( i = 0; i < 6; ++i ) {
|
||||||
digits[i] -= '0';
|
digits[i] -= '0';
|
||||||
}
|
}
|
||||||
radio_display_data[12] = digits[4] << 4 | digits[5];
|
radio_display_data[12] = digits[4] << 4 | digits[5];
|
||||||
|
@ -818,7 +819,7 @@ bool FGATC610x::do_radio_display() {
|
||||||
nav1 = 0.0;
|
nav1 = 0.0;
|
||||||
}
|
}
|
||||||
sprintf(digits, "%06.2f", nav1);
|
sprintf(digits, "%06.2f", nav1);
|
||||||
for ( int i = 0; i < 6; ++i ) {
|
for ( i = 0; i < 6; ++i ) {
|
||||||
digits[i] -= '0';
|
digits[i] -= '0';
|
||||||
}
|
}
|
||||||
radio_display_data[15] = digits[4] << 4 | digits[5];
|
radio_display_data[15] = digits[4] << 4 | digits[5];
|
||||||
|
@ -833,7 +834,7 @@ bool FGATC610x::do_radio_display() {
|
||||||
nav2_stby = 0.0;
|
nav2_stby = 0.0;
|
||||||
}
|
}
|
||||||
sprintf(digits, "%06.2f", nav2_stby);
|
sprintf(digits, "%06.2f", nav2_stby);
|
||||||
for ( int i = 0; i < 6; ++i ) {
|
for ( i = 0; i < 6; ++i ) {
|
||||||
digits[i] -= '0';
|
digits[i] -= '0';
|
||||||
}
|
}
|
||||||
radio_display_data[24] = digits[4] << 4 | digits[5];
|
radio_display_data[24] = digits[4] << 4 | digits[5];
|
||||||
|
@ -846,7 +847,7 @@ bool FGATC610x::do_radio_display() {
|
||||||
nav2 = 0.0;
|
nav2 = 0.0;
|
||||||
}
|
}
|
||||||
sprintf(digits, "%06.2f", nav2);
|
sprintf(digits, "%06.2f", nav2);
|
||||||
for ( int i = 0; i < 6; ++i ) {
|
for ( i = 0; i < 6; ++i ) {
|
||||||
digits[i] -= '0';
|
digits[i] -= '0';
|
||||||
}
|
}
|
||||||
radio_display_data[27] = digits[4] << 4 | digits[5];
|
radio_display_data[27] = digits[4] << 4 | digits[5];
|
||||||
|
@ -861,7 +862,7 @@ bool FGATC610x::do_radio_display() {
|
||||||
adf_stby = 0.0;
|
adf_stby = 0.0;
|
||||||
}
|
}
|
||||||
sprintf(digits, "%03.0f", adf_stby);
|
sprintf(digits, "%03.0f", adf_stby);
|
||||||
for ( int i = 0; i < 6; ++i ) {
|
for ( i = 0; i < 6; ++i ) {
|
||||||
digits[i] -= '0';
|
digits[i] -= '0';
|
||||||
}
|
}
|
||||||
radio_display_data[30] = digits[2] << 4 | 0x0f;
|
radio_display_data[30] = digits[2] << 4 | 0x0f;
|
||||||
|
@ -873,7 +874,7 @@ bool FGATC610x::do_radio_display() {
|
||||||
adf = 0.0;
|
adf = 0.0;
|
||||||
}
|
}
|
||||||
sprintf(digits, "%03.0f", adf);
|
sprintf(digits, "%03.0f", adf);
|
||||||
for ( int i = 0; i < 6; ++i ) {
|
for ( i = 0; i < 6; ++i ) {
|
||||||
digits[i] -= '0';
|
digits[i] -= '0';
|
||||||
}
|
}
|
||||||
radio_display_data[33] = digits[1] << 4 | digits[2];
|
radio_display_data[33] = digits[1] << 4 | digits[2];
|
||||||
|
|
|
@ -103,7 +103,7 @@ FGFX::init ()
|
||||||
_crank[i] = new FGSimpleSound(fgGetString("/sim/sounds/cranking/path",
|
_crank[i] = new FGSimpleSound(fgGetString("/sim/sounds/cranking/path",
|
||||||
"Sounds/cranking.wav"));
|
"Sounds/cranking.wav"));
|
||||||
_crank[i]->set_volume(fgGetFloat("/sim/sounds/cranking/volume", 0.5));
|
_crank[i]->set_volume(fgGetFloat("/sim/sounds/cranking/volume", 0.5));
|
||||||
_crank[i]->set_pitch(fgGetFloat("/sim/sounds/cranking/pitch", 1.00));
|
_crank[i]->set_pitch(fgGetFloat("/sim/sounds/cranking/pitch", 0.80));
|
||||||
mgr->add(_crank[i], crank_names[i]);
|
mgr->add(_crank[i], crank_names[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ FGFX::init ()
|
||||||
// Create and add the click noise.
|
// Create and add the click noise.
|
||||||
_click = new FGSimpleSound(fgGetString("/sim/sounds/click/path",
|
_click = new FGSimpleSound(fgGetString("/sim/sounds/click/path",
|
||||||
"Sounds/click.wav"));
|
"Sounds/click.wav"));
|
||||||
_flaps->set_volume(fgGetFloat("/sim/sounds/click/volume", 1.0));
|
_flaps->set_volume(fgGetFloat("/sim/sounds/click/volume", 0.5));
|
||||||
_flaps->set_pitch(fgGetFloat("/sim/sounds/click/pitch", 1.0));
|
_flaps->set_pitch(fgGetFloat("/sim/sounds/click/pitch", 1.0));
|
||||||
mgr->add(_click, "click");
|
mgr->add(_click, "click");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue