]> git.mxchange.org Git - flightgear.git/commitdiff
Tweaks to PLIB version detection.
authorcurt <curt>
Wed, 14 Mar 2001 23:38:34 +0000 (23:38 +0000)
committercurt <curt>
Wed, 14 Mar 2001 23:38:34 +0000 (23:38 +0000)
src/Include/config.h.in
src/Objects/obj.cxx
src/Sound/soundmgr.cxx

index f291938dd4e38e0716f015e18293a13775bf3e56..b1c6758c2cd1e19acda3f83b214c422d86704f1d 100644 (file)
@@ -39,7 +39,7 @@
 
    
 /* Define to enable plib joystick support (recommended) */
-#undef PLIB_AUDIO_IS_BROKEN
+#undef PLIB_1_2_X
 
    
 /* Define to eliminate all trace of debugging messages such as for a 
index e18bfa9aaedb31e19e763e8bd2ce9e1549ddd819..71e03f28109be0cd8b79513493953ef21242334a 100644 (file)
 #include <stdio.h>
 #include <string.h>
 
-// #if defined ( __sun__ )
-// extern "C" void *memmove(void *, const void *, size_t);
-// extern "C" void *memset(void *, int, size_t);
-// #endif
-
 #include <simgear/compiler.h>
 #include <simgear/io/sg_binobj.hxx>
 
@@ -247,6 +242,7 @@ ssgBranch *fgGenTile( const string& path, FGTileEntry *t) {
 }
 
 
+#if defined ( PLIB_1_2_X )
 static float fgTriArea( sgVec3 p0, sgVec3 p1, sgVec3 p2 ) {
     /* 
        From comp.graph.algorithms FAQ
@@ -272,6 +268,9 @@ static float fgTriArea( sgVec3 p0, sgVec3 p1, sgVec3 p2 ) {
 
     return( sgAbs(sgScalarProductVec3( norm, sum )) * SG_HALF );
 }
+#else
+#  define fgTriArea(p0,p1,p2) sgTriArea(p0,p1,p2)
+#endif
 
 
 static void random_pt_inside_tri( float *res,
index 24d3154b61d4f1e59d81234f496df6eee4b0a223..5a170e9a4db033d6720630b03b3df2624495f2be 100644 (file)
@@ -146,8 +146,8 @@ bool FGSoundMgr::remove( const string& refname ) {
                                        NULL,
                                        SL_VOLUME_ENVELOPE );
 
-#if defined ( PLIB_AUDIO_IS_BROKEN )
-       // if PLIB_AUDIO_IS_BROKEN, we can't reliably remove sounds
+#if defined ( PLIB_1_2_X )
+       // if PLIB_1_2_X, we can't reliably remove sounds
        // that are currently being played. :-( So, let's just not
        // remove them and return false.  The effects of this are that
        // the sound sample will continue to finish playing (or