1
0
Fork 0

polar3d.h renamed to polar3d.hxx

vector.h renamed to vector.hxx
updated audio support so it waits to create audio classes (and tie up
  /dev/dsp) until the mpg123 player is finished.
This commit is contained in:
curt 1998-07-08 14:45:07 +00:00
parent a96f1bc278
commit 0099b307bc
3 changed files with 37 additions and 17 deletions

View file

@ -69,7 +69,7 @@
#include <Joystick/joystick.h> #include <Joystick/joystick.h>
#include <Math/fg_geodesy.h> #include <Math/fg_geodesy.h>
#include <Math/mat3.h> #include <Math/mat3.h>
#include <Math/polar3d.h> #include <Math/polar3d.hxx>
#include <PUI/pu.h> #include <PUI/pu.h>
#include <Scenery/scenery.hxx> #include <Scenery/scenery.hxx>
#include <Scenery/tilemgr.hxx> #include <Scenery/tilemgr.hxx>
@ -99,8 +99,8 @@ int use_signals = 0;
// Global structures for the Audio library // Global structures for the Audio library
#ifdef HAVE_AUDIO_SUPPORT #ifdef HAVE_AUDIO_SUPPORT
slScheduler audio_sched ( 8000 ); slScheduler *audio_sched;
smMixer audio_mixer; smMixer *audio_mixer;
slSample *s1; slSample *s1;
slSample *s2; slSample *s2;
#endif #endif
@ -390,6 +390,8 @@ static void fgRenderFrame( void ) {
if ( o->textures ) { if ( o->textures ) {
// texture parameters // texture parameters
xglEnable( GL_TEXTURE_2D ); xglEnable( GL_TEXTURE_2D );
xglTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE ) ;
xglHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST ) ;
// set base color (I don't think this is doing anything here) // set base color (I don't think this is doing anything here)
xglMaterialfv (GL_FRONT, GL_AMBIENT, white); xglMaterialfv (GL_FRONT, GL_AMBIENT, white);
xglMaterialfv (GL_FRONT, GL_DIFFUSE, white); xglMaterialfv (GL_FRONT, GL_DIFFUSE, white);
@ -581,7 +583,7 @@ static void fgMainLoop( void ) {
// Run audio scheduler // Run audio scheduler
#ifdef HAVE_AUDIO_SUPPORT #ifdef HAVE_AUDIO_SUPPORT
audio_sched . update(); audio_sched -> update();
#endif #endif
// redraw display // redraw display
@ -625,7 +627,7 @@ static void fgIdleFunction ( void ) {
strcat(mp3file, "/Sounds/"); strcat(mp3file, "/Sounds/");
strcat(mp3file, "intro.mp3"); strcat(mp3file, "intro.mp3");
sprintf(command, sprintf(command,
"(touch %s; ampg123 %s > /dev/null 2>&1; /bin/rm %s) &", "(touch %s; mpg123 %s > /dev/null 2>&1; /bin/rm %s) &",
lockfile, mp3file, lockfile ); lockfile, mp3file, lockfile );
fgPrintf( FG_GENERAL, FG_INFO, fgPrintf( FG_GENERAL, FG_INFO,
"Starting intro music: %s\n", mp3file); "Starting intro music: %s\n", mp3file);
@ -695,10 +697,10 @@ static void fgIdleFunction ( void ) {
} }
#endif // WIN32 #endif // WIN32
// audio_sched = new slScheduler ( 8000 ); audio_sched = new slScheduler ( 8000 );
// audio_mixer = new smMixer; audio_mixer = new smMixer;
audio_mixer . setMasterVolume ( 30 ) ; /* 50% of max volume. */ audio_mixer -> setMasterVolume ( 30 ) ; /* 50% of max volume. */
audio_sched . setSafetyMargin ( 1.0 ) ; audio_sched -> setSafetyMargin ( 1.0 ) ;
strcpy(path, o->fg_root); strcpy(path, o->fg_root);
strcat(path, "/Sounds/"); strcat(path, "/Sounds/");
@ -706,10 +708,10 @@ static void fgIdleFunction ( void ) {
strcat(slfile, "prpidle.wav"); strcat(slfile, "prpidle.wav");
// s1 = new slSample ( slfile ); // s1 = new slSample ( slfile );
s1 = new slSample ( "/dos/X-System-HSR/sounds/xp_recip.wav", s1 = new slSample ( "/dos/X-System-HSR/sounds/xp_recip.wav",
&audio_sched ); audio_sched );
printf("Rate = %d Bps = %d Stereo = %d\n", printf("Rate = %d Bps = %d Stereo = %d\n",
s1 -> getRate(), s1 -> getBps(), s1 -> getStereo()); s1 -> getRate(), s1 -> getBps(), s1 -> getStereo());
audio_sched . loopSample ( s1 ); audio_sched -> loopSample ( s1 );
// strcpy(slfile, path); // strcpy(slfile, path);
// strcat(slfile, "thunder.wav"); // strcat(slfile, "thunder.wav");
@ -869,6 +871,12 @@ int main( int argc, char **argv ) {
// $Log$ // $Log$
// Revision 1.32 1998/07/08 14:45:07 curt
// polar3d.h renamed to polar3d.hxx
// vector.h renamed to vector.hxx
// updated audio support so it waits to create audio classes (and tie up
// /dev/dsp) until the mpg123 player is finished.
//
// Revision 1.31 1998/07/06 21:34:17 curt // Revision 1.31 1998/07/06 21:34:17 curt
// Added an enable/disable splash screen option. // Added an enable/disable splash screen option.
// Added an enable/disable intro music option. // Added an enable/disable intro music option.

View file

@ -31,8 +31,8 @@
#include <Flight/flight.h> #include <Flight/flight.h>
#include <Include/fg_constants.h> #include <Include/fg_constants.h>
#include <Math/mat3.h> #include <Math/mat3.h>
#include <Math/polar3d.h> #include <Math/polar3d.hxx>
#include <Math/vector.h> #include <Math/vector.hxx>
#include <Scenery/scenery.hxx> #include <Scenery/scenery.hxx>
#include <Time/fg_time.hxx> #include <Time/fg_time.hxx>
@ -89,7 +89,7 @@ void fgVIEW::UpdateFOV( fgOPTIONS *o ) {
// Update the view parameters // Update the view parameters
void fgVIEW::Update( fgFLIGHT *f ) { void fgVIEW::Update( fgFLIGHT *f ) {
fgOPTIONS *o; fgOPTIONS *o;
fgPolarPoint3d p; fgPoint3d p;
MAT3vec vec, forward, v0, minus_z; MAT3vec vec, forward, v0, minus_z;
MAT3mat R, TMP, UP, LOCAL, VIEW; MAT3mat R, TMP, UP, LOCAL, VIEW;
double ntmp; double ntmp;
@ -455,6 +455,12 @@ void fg_gluLookAt( GLdouble eyex, GLdouble eyey, GLdouble eyez,
// $Log$ // $Log$
// Revision 1.14 1998/07/08 14:45:08 curt
// polar3d.h renamed to polar3d.hxx
// vector.h renamed to vector.hxx
// updated audio support so it waits to create audio classes (and tie up
// /dev/dsp) until the mpg123 player is finished.
//
// Revision 1.13 1998/07/04 00:52:27 curt // Revision 1.13 1998/07/04 00:52:27 curt
// Add my own version of gluLookAt() (which is nearly identical to the // Add my own version of gluLookAt() (which is nearly identical to the
// Mesa/glu version.) But, by calculating the Model View matrix our selves // Mesa/glu version.) But, by calculating the Model View matrix our selves

View file

@ -87,14 +87,14 @@ public:
double vfc_ratio; double vfc_ratio;
// absolute view position // absolute view position
fgCartesianPoint3d abs_view_pos; fgPoint3d abs_view_pos;
// view position translated to scenery.center // view position translated to scenery.center
fgCartesianPoint3d view_pos; fgPoint3d view_pos;
// cartesion coordinates of current lon/lat if at sea level // cartesion coordinates of current lon/lat if at sea level
// translated to scenery.center*/ // translated to scenery.center*/
fgCartesianPoint3d cur_zero_elev; fgPoint3d cur_zero_elev;
// vector in cartesian coordinates from current position to the // vector in cartesian coordinates from current position to the
// postion on the earth's surface the sun is directly over // postion on the earth's surface the sun is directly over
@ -173,6 +173,12 @@ void fg_gluLookAt( GLdouble eyex, GLdouble eyey, GLdouble eyez,
// $Log$ // $Log$
// Revision 1.10 1998/07/08 14:45:09 curt
// polar3d.h renamed to polar3d.hxx
// vector.h renamed to vector.hxx
// updated audio support so it waits to create audio classes (and tie up
// /dev/dsp) until the mpg123 player is finished.
//
// Revision 1.9 1998/07/04 00:52:27 curt // Revision 1.9 1998/07/04 00:52:27 curt
// Add my own version of gluLookAt() (which is nearly identical to the // Add my own version of gluLookAt() (which is nearly identical to the
// Mesa/glu version.) But, by calculating the Model View matrix our selves // Mesa/glu version.) But, by calculating the Model View matrix our selves