plib-cvs Mailing List for PLIB (Page 21)
Brought to you by:
sjbaker
You can subscribe to this list here.
2002 |
Jan
(25) |
Feb
(10) |
Mar
(60) |
Apr
(49) |
May
(54) |
Jun
(94) |
Jul
(82) |
Aug
(251) |
Sep
(366) |
Oct
(17) |
Nov
(20) |
Dec
(14) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(12) |
Feb
(8) |
Mar
(2) |
Apr
(4) |
May
(5) |
Jun
(8) |
Jul
(23) |
Aug
(8) |
Sep
(7) |
Oct
(5) |
Nov
(20) |
Dec
(20) |
2004 |
Jan
(19) |
Feb
(70) |
Mar
(108) |
Apr
(24) |
May
(6) |
Jun
(5) |
Jul
|
Aug
(8) |
Sep
(18) |
Oct
(27) |
Nov
|
Dec
(13) |
2005 |
Jan
(19) |
Feb
(13) |
Mar
(1) |
Apr
|
May
(10) |
Jun
(1) |
Jul
(10) |
Aug
(5) |
Sep
(2) |
Oct
(2) |
Nov
(6) |
Dec
(4) |
2006 |
Jan
(9) |
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Steve B. <sj...@us...> - 2003-01-04 02:55:59
|
Update of /cvsroot/plib/plib/src/util In directory sc8-pr-cvs1:/tmp/cvs-serv3590/plib/src/util Modified Files: ul.h Log Message: Committed numerous patches from 3rd parties: Added JS support for Mac OS-X. Removed JS support for HPUX. Fixes for IRIX sound support. Compile problems fixed in ul.h. Load/Save FLT fixed to include byte-swapping. Several fixes to MDL loader. Fixed 'frozen particle' bug in ssgaParticleSystem. Index: ul.h =================================================================== RCS file: /cvsroot/plib/plib/src/util/ul.h,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- ul.h 17 Dec 2002 16:43:10 -0000 1.59 +++ ul.h 4 Jan 2003 02:55:56 -0000 1.60 @@ -121,7 +121,7 @@ #include <unistd.h> #endif -#if defined(UL_LINUX) || defined(UL_BSD) +#if defined(UL_LINUX) || defined(UL_BSD) || defined(UL_IRIX) #include <unistd.h> #include <dlfcn.h> #include <fcntl.h> |
From: Steve B. <sj...@us...> - 2003-01-04 02:55:59
|
Update of /cvsroot/plib/plib/src/ssgAux In directory sc8-pr-cvs1:/tmp/cvs-serv3590/plib/src/ssgAux Modified Files: ssgaParticleSystem.cxx Log Message: Committed numerous patches from 3rd parties: Added JS support for Mac OS-X. Removed JS support for HPUX. Fixes for IRIX sound support. Compile problems fixed in ul.h. Load/Save FLT fixed to include byte-swapping. Several fixes to MDL loader. Fixed 'frozen particle' bug in ssgaParticleSystem. Index: ssgaParticleSystem.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/ssgaParticleSystem.cxx,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ssgaParticleSystem.cxx 2 Sep 2002 06:05:49 -0000 1.9 +++ ssgaParticleSystem.cxx 4 Jan 2003 02:55:55 -0000 1.10 @@ -132,7 +132,7 @@ j += 4 ; } -// rawSetNumVertices ( j ) ; /* Avoid drawing more than 'j' vertices. */ + rawSetNumVertices ( j ) ; /* Avoid drawing more than 'j' vertices. */ if ( j > 0 ) { |
From: Steve B. <sj...@us...> - 2003-01-04 02:55:58
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv3590/plib/src/ssg Modified Files: ssgLoadFLT.cxx ssgLoadMDL.cxx ssgSaveFLT.cxx Log Message: Committed numerous patches from 3rd parties: Added JS support for Mac OS-X. Removed JS support for HPUX. Fixes for IRIX sound support. Compile problems fixed in ul.h. Load/Save FLT fixed to include byte-swapping. Several fixes to MDL loader. Fixed 'frozen particle' bug in ssgaParticleSystem. Index: ssgLoadFLT.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadFLT.cxx,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- ssgLoadFLT.cxx 12 Dec 2002 15:25:48 -0000 1.36 +++ ssgLoadFLT.cxx 4 Jan 2003 02:55:55 -0000 1.37 @@ -167,7 +167,6 @@ #if !defined(BYTE_ORDER) || BYTE_ORDER != BIG_ENDIAN -#if !defined(BYTE_ORDER) static void _swab16(const void *src, void *dst, int n) { ushort *s = (ushort *)src; @@ -178,7 +177,6 @@ ((t & 0x00ffU) << 8)); } } -#endif static void _swab32(const void *src, void *dst, int n) { Index: ssgLoadMDL.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadMDL.cxx,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- ssgLoadMDL.cxx 2 Sep 2002 06:05:48 -0000 1.43 +++ ssgLoadMDL.cxx 4 Jan 2003 02:55:55 -0000 1.44 @@ -732,10 +732,11 @@ // Find beginning of BGL Code segment unsigned short op1, op2; - fread(&op1, 2, 1, fp); + op1 = ulEndianReadLittle16(fp); + while(!feof(fp)) { - fread(&op2, 2, 1, fp); + op2 = ulEndianReadLittle16(fp); if(op1 == 0x76 && op2 == 0x3a) { fseek(fp, -4, SEEK_CUR); @@ -784,8 +785,7 @@ while(!feof(fp) && !done) { unsigned int skip_offset = 0; - unsigned short opcode; - fread(&opcode, 2, 1, fp); + unsigned short opcode = ulEndianReadLittle16(fp); DEBUGPRINT( "opcode = " << std::hex << opcode << std::dec << std::endl ); @@ -1437,8 +1437,7 @@ case 0x03: { //DEBUGPRINT( "BGL_CASE\n" ); - unsigned short number_cases; - fread(&number_cases, 2, 1, fp); + unsigned short number_cases = ulEndianReadLittle16(fp); skip_offset = 6 + 2 * number_cases; } break; Index: ssgSaveFLT.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgSaveFLT.cxx,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ssgSaveFLT.cxx 29 Oct 2002 23:39:09 -0000 1.3 +++ ssgSaveFLT.cxx 4 Jan 2003 02:55:55 -0000 1.4 @@ -355,10 +355,12 @@ static void writeLeaf ( ssgLeaf *leaf ) { + int i ; + writeObject () ; writePush () ; - for ( int i = 0 ; i < leaf -> getNumLines () ; i++ ) + for ( i = 0 ; i < leaf -> getNumLines () ; i++ ) { writeFace ( leaf, TRUE ) ; @@ -384,7 +386,7 @@ writePop () ; } - for ( int i = 0 ; i < leaf -> getNumTriangles () ; i++ ) + for ( i = 0 ; i < leaf -> getNumTriangles () ; i++ ) { writeFace ( leaf, FALSE ) ; |
From: Steve B. <sj...@us...> - 2003-01-04 02:55:58
|
Update of /cvsroot/plib/plib/src/sl In directory sc8-pr-cvs1:/tmp/cvs-serv3590/plib/src/sl Modified Files: sl.h slDSP.cxx Log Message: Committed numerous patches from 3rd parties: Added JS support for Mac OS-X. Removed JS support for HPUX. Fixes for IRIX sound support. Compile problems fixed in ul.h. Load/Save FLT fixed to include byte-swapping. Several fixes to MDL loader. Fixed 'frozen particle' bug in ssgaParticleSystem. Index: sl.h =================================================================== RCS file: /cvsroot/plib/plib/src/sl/sl.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- sl.h 17 Dec 2002 16:43:19 -0000 1.21 +++ sl.h 4 Jan 2003 02:55:55 -0000 1.22 @@ -37,6 +37,8 @@ #define SLDSP_DEFAULT_DEVICE "dsp" // dummy ... #elif defined(UL_SOLARIS) #define SLDSP_DEFAULT_DEVICE "/dev/audio" +#elif defined(UL_HPUX) +#define SLDSP_DEFAULT_DEVICE "/dev/audio" #elif defined(UL_MACINTOSH) || defined(UL_MAC_OSX) #define SLDSP_DEFAULT_DEVICE "dsp" // dummy #else Index: slDSP.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/sl/slDSP.cxx,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- slDSP.cxx 30 Nov 2002 00:41:49 -0000 1.19 +++ slDSP.cxx 4 Jan 2003 02:55:55 -0000 1.20 @@ -636,13 +636,13 @@ return; } - init_bytes = 1024 * 16; + init_bytes = 1024 * 4 ; config = ALnewconfig(); ALsetchannels ( config, _stereo ? AL_STEREO : AL_MONO ); ALsetwidth ( config, _bps == 8 ? AL_SAMPLE_8 : AL_SAMPLE_16 ); - ALsetqueuesize( config, init_bytes ); + ALsetqueuesize( config, init_bytes * 2 ); port = ALopenport( device, "w", config ); @@ -690,7 +690,7 @@ if ( error ) return 0 ; - return ALgetqueuesize( config ); + return ALgetqueuesize( config ) / 2 ; } void slDSP::getBufferInfo () @@ -700,8 +700,6 @@ } -#define swap_half(a) ( ((a & 0xff) << 8) | ((unsigned short)(a) >> 8) ) - void slDSP::write ( void *buffer, size_t length ) { char *buf = (char *)buffer; @@ -709,15 +707,10 @@ if ( error || (int)length <= 0 ) return ; - // Steve: is this a problem ?? - - for ( int i = 0; i < (int)length; i++ ) { + for ( int i = 0; i < (int)length; i++ ) buf[i] = buf[i] >> 1; - if (bps == 16) - buf[i] = swap_half( buf[i] ); - } - ALwritesamps(port, (void *)buf, length/2 ); + ALwritesamps(port, (void *)buf, length ); } @@ -728,10 +721,7 @@ if ( error ) return 0.0f ; - samples_remain = ALgetfillable(port); - - if ( stereo ) samples_remain /= 2 ; - if ( bps == 16 ) samples_remain /= 2 ; + samples_remain = ALgetfillable(port) / 2 ; return (float) samples_remain / (float) rate ; } @@ -744,10 +734,7 @@ if ( error ) return 0.0f ; - samples_used = ALgetfilled(port); - - if ( stereo ) samples_used /= 2 ; - if ( bps == 16 ) samples_used /= 2 ; + samples_used = ALgetfilled(port) * 2 ; return (float) samples_used / (float) rate ; } |
From: Steve B. <sj...@us...> - 2003-01-04 02:55:58
|
Update of /cvsroot/plib/plib/src/js In directory sc8-pr-cvs1:/tmp/cvs-serv3590/plib/src/js Modified Files: Makefile.am js.h jsNone.cxx Added Files: jsMacOSX.cxx Log Message: Committed numerous patches from 3rd parties: Added JS support for Mac OS-X. Removed JS support for HPUX. Fixes for IRIX sound support. Compile problems fixed in ul.h. Load/Save FLT fixed to include byte-swapping. Several fixes to MDL loader. Fixed 'frozen particle' bug in ssgaParticleSystem. --- NEW FILE: jsMacOSX.cxx --- #include "js.h" #ifdef UL_MAC_OSX #include <mach/mach_error.h> #include <IOKit/hid/IOHIDKeys.h> #include <IOKit/IOCFPlugIn.h> #include <CoreFoundation/CoreFoundation.h> #ifdef MACOS_10_0_4 # include <IOKit/hidsystem/IOHIDUsageTables.h> #else /* The header was moved here in MacOS X 10.1 */ # include <Kernel/IOKit/hidsystem/IOHIDUsageTables.h> #endif int jsJoystick::kNumDevices = 32 ; int jsJoystick::numDevices = -1; io_object_t jsJoystick::ioDevices[kNumDevices]; [...294 lines suppressed...] } void jsJoystick::rawRead(int *buttons, float *axes) { *buttons = 0; IOHIDEventStruct hidEvent; for (int b=0; b<num_buttons; ++b) { (*hidDev)->getElementValue(hidDev, buttonCookies[b], &hidEvent); if (hidEvent.value) *buttons |= 1 << b; } for (int a=0; a<num_axes; ++a) { (*hidDev)->getElementValue(hidDev, axisCookies[a], &hidEvent); axes[a] = hidEvent.value; } } #endif Index: Makefile.am =================================================================== RCS file: /cvsroot/plib/plib/src/js/Makefile.am,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Makefile.am 30 Nov 2002 15:52:38 -0000 1.9 +++ Makefile.am 4 Jan 2003 02:55:53 -0000 1.10 @@ -5,7 +5,8 @@ include_HEADERS = js.h libplibjs_a_SOURCES = js.cxx jsLinux.cxx jsLinuxOld.cxx jsMacOS.cxx \ - jsWindows.cxx jsBSD.cxx jsNone.cxx + jsMacOSX.cxx jsWindows.cxx jsBSD.cxx \ + jsNone.cxx INCLUDES = -I$(top_srcdir)/src/util Index: js.h =================================================================== RCS file: /cvsroot/plib/plib/src/js/js.h,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- js.h 30 Nov 2002 00:41:49 -0000 1.28 +++ js.h 4 Jan 2003 02:55:53 -0000 1.29 @@ -37,9 +37,15 @@ #endif #ifdef UL_BSD -# include <machine/joystick.h> -# define JS_DATA_TYPE joystick -# define JS_RETURN (sizeof(struct JS_DATA_TYPE)) +# include <machine/joystick.h> +# define JS_DATA_TYPE joystick +# define JS_RETURN (sizeof(struct JS_DATA_TYPE)) +#endif + +#ifdef UL_MAC_OSX +# include <mach/mach.h> +# include <IOKit/IOkitLib.h> +# include <IOKit/hid/IOHIDLib.h> #endif #ifdef UL_LINUX @@ -85,6 +91,31 @@ #define isp_num_needs 41 ISpElementReference isp_elem [ isp_num_needs ] ; ISpNeed isp_needs [ isp_num_needs ] ; + +#elif defined(UL_MAC_OSX) + + IOHIDDeviceInterface ** hidDev; + static const int kNumDevices; + static int numDevices; + static io_object_t ioDevices[kNumDevices]; + + static void findDevices(mach_port_t); + static CFDictionaryRef getCFProperties(io_object_t); + + void enumerateElements(CFTypeRef element); + /// callback for CFArrayApply + static void elementEnumerator( const void *element, void* vjs); + void parseElement(CFDictionaryRef element); + + void addAxisElement(CFDictionaryRef axis); + void addButtonElement(CFDictionaryRef button); + void addHatElement(CFDictionaryRef hat); + + IOHIDElementCookie buttonCookies[41]; + IOHIDElementCookie axisCookies[_JS_MAX_AXES]; + long minReport[_JS_MAX_AXES], + maxReport[_JS_MAX_AXES]; + #elif defined(UL_WIN32) JOYCAPS jsCaps ; JOYINFOEX js ; Index: jsNone.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/js/jsNone.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- jsNone.cxx 30 Nov 2002 15:52:38 -0000 1.1 +++ jsNone.cxx 4 Jan 2003 02:55:54 -0000 1.2 @@ -22,7 +22,7 @@ #include "js.h" -#if defined(UL_IRIX) || defined(UL_SOLARIS) +#if defined(UL_IRIX) || defined(UL_SOLARIS) || defined(UL_HPUX) /* check the joystick driver version */ |
From: M?rten Str?m. <str...@us...> - 2002-12-17 16:43:22
|
Update of /cvsroot/plib/plib/src/sl In directory sc8-pr-cvs1:/tmp/cvs-serv7424 Modified Files: sl.h Log Message: backed out hpux sl support Index: sl.h =================================================================== RCS file: /cvsroot/plib/plib/src/sl/sl.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- sl.h 13 Dec 2002 14:40:13 -0000 1.20 +++ sl.h 17 Dec 2002 16:43:19 -0000 1.21 @@ -39,8 +39,6 @@ #define SLDSP_DEFAULT_DEVICE "/dev/audio" #elif defined(UL_MACINTOSH) || defined(UL_MAC_OSX) #define SLDSP_DEFAULT_DEVICE "dsp" // dummy -#elif defined(UL_HPUX) -#define SLDSP_DEFAULT_DEVICE "/dev/audio" #else #error "Port me !" #endif |
From: M?rten Str?m. <str...@us...> - 2002-12-17 16:43:14
|
Update of /cvsroot/plib/plib/src/util In directory sc8-pr-cvs1:/tmp/cvs-serv7276 Modified Files: ul.h Log Message: worked around the bsd #ifdef Index: ul.h =================================================================== RCS file: /cvsroot/plib/plib/src/util/ul.h,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- ul.h 13 Dec 2002 14:40:11 -0000 1.58 +++ ul.h 17 Dec 2002 16:43:10 -0000 1.59 @@ -84,13 +84,13 @@ #define UL_SOLARIS 1 -#elif (defined(__unix__) || defined(unix)) && !defined(USG) - -#define UL_BSD 1 - #elif defined(hpux) #define UL_HPUX 1 + +#elif (defined(__unix__) || defined(unix)) && !defined(USG) + +#define UL_BSD 1 #endif |
From: M?rten Str?m. <str...@us...> - 2002-12-13 14:40:47
|
Update of /cvsroot/plib/plib/src/util In directory sc8-pr-cvs1:/tmp/cvs-serv20690/src/util Modified Files: ul.h Log Message: changes for hpux Index: ul.h =================================================================== RCS file: /cvsroot/plib/plib/src/util/ul.h,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- ul.h 30 Nov 2002 00:41:50 -0000 1.57 +++ ul.h 13 Dec 2002 14:40:11 -0000 1.58 @@ -88,6 +88,10 @@ #define UL_BSD 1 +#elif defined(hpux) + +#define UL_HPUX 1 + #endif /* |
From: M?rten Str?m. <str...@us...> - 2002-12-13 14:40:45
|
Update of /cvsroot/plib/plib In directory sc8-pr-cvs1:/tmp/cvs-serv20690 Modified Files: configure.in Log Message: changes for hpux Index: configure.in =================================================================== RCS file: /cvsroot/plib/plib/configure.in,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- configure.in 9 Nov 2002 00:21:43 -0000 1.49 +++ configure.in 13 Dec 2002 14:40:07 -0000 1.50 @@ -375,7 +375,7 @@ AC_TRY_COMPILE([ #include <sys/types.h> #include <sys/socket.h> -socklen_t x; +int accept (int, struct sockaddr *, socklen_t *); ],[],[ AC_MSG_RESULT(yes)],[ AC_TRY_COMPILE([ |
From: M?rten Str?m. <str...@us...> - 2002-12-13 14:40:18
|
Update of /cvsroot/plib/plib/src/sl In directory sc8-pr-cvs1:/tmp/cvs-serv20690/src/sl Modified Files: sl.h Log Message: changes for hpux Index: sl.h =================================================================== RCS file: /cvsroot/plib/plib/src/sl/sl.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- sl.h 30 Nov 2002 13:18:56 -0000 1.19 +++ sl.h 13 Dec 2002 14:40:13 -0000 1.20 @@ -39,6 +39,8 @@ #define SLDSP_DEFAULT_DEVICE "/dev/audio" #elif defined(UL_MACINTOSH) || defined(UL_MAC_OSX) #define SLDSP_DEFAULT_DEVICE "dsp" // dummy +#elif defined(UL_HPUX) +#define SLDSP_DEFAULT_DEVICE "/dev/audio" #else #error "Port me !" #endif |
From: M?rten Str?m. <str...@us...> - 2002-12-12 15:25:51
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv27314 Modified Files: ssgLoadFLT.cxx Log Message: bugfix Index: ssgLoadFLT.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadFLT.cxx,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- ssgLoadFLT.cxx 30 Nov 2002 00:41:50 -0000 1.35 +++ ssgLoadFLT.cxx 12 Dec 2002 15:25:48 -0000 1.36 @@ -167,7 +167,7 @@ #if !defined(BYTE_ORDER) || BYTE_ORDER != BIG_ENDIAN -#ifdef PROBE_ENDIAN +#if !defined(BYTE_ORDER) static void _swab16(const void *src, void *dst, int n) { ushort *s = (ushort *)src; |
From: Steve B. <sj...@us...> - 2002-12-04 20:42:34
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv16441/plib/src/ssg Modified Files: ssgLeaf.cxx ssgOptimiser.cxx Log Message: Backed out change to ssgOptimiser - it was pessimising some models! Index: ssgLeaf.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLeaf.cxx,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- ssgLeaf.cxx 4 Dec 2002 20:15:22 -0000 1.21 +++ ssgLeaf.cxx 4 Dec 2002 20:42:27 -0000 1.22 @@ -158,8 +158,6 @@ void ssgLeaf::getStats ( int *num_branches, int *num_leaves, int *num_tris, int *num_verts ) { - int nb, nl, nt, nv ; - *num_branches = 0 ; *num_leaves = 1 ; /* this! */ *num_tris = getNumTriangles () ; Index: ssgOptimiser.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgOptimiser.cxx,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- ssgOptimiser.cxx 4 Dec 2002 19:12:34 -0000 1.30 +++ ssgOptimiser.cxx 4 Dec 2002 20:42:28 -0000 1.31 @@ -474,8 +474,7 @@ build_leaf_list ( k, leaf_list ) ; } } - else - if ( ent -> isAKindOf ( ssgTypeLeaf () ) && ! ent -> isAKindOf ( ssgTypeTween() ) ) + else if ( ent -> isAKindOf ( ssgTypeLeaf () ) ) { ssgLeaf *l = (ssgLeaf *) ent ; @@ -622,28 +621,27 @@ for ( ssgEntity *k = b_ent -> getKid ( 0 ) ; k != NULL ; [...167 lines suppressed...] @@ -1037,12 +1021,11 @@ * ent -- the entity to process * trans -- transform */ - void ssgTransTool ( ssgEntity *ent, const sgMat4 trans ) { if ( ent -> isAKindOf ( ssgTypeLeaf () ) ) { - ((ssgLeaf *) ent) -> transform ( trans ) ; + ((ssgLeaf *) ent) -> transform ( trans ) ; return ; } @@ -1083,5 +1066,3 @@ b_ent -> recalcBSphere () ; } - - |
From: Steve B. <sj...@us...> - 2002-12-04 20:15:26
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv20760/plib/src/ssg Modified Files: ssg.h ssgBranch.cxx ssgLeaf.cxx Log Message: Added some simple static statistics gathering. Hence ssgEntity::getStats returns number of branches, leaves, triangles and vertices. Index: ssg.h =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssg.h,v retrieving revision 1.159 retrieving revision 1.160 diff -u -d -r1.159 -r1.160 --- ssg.h 30 Nov 2002 00:41:49 -0000 1.159 +++ ssg.h 4 Dec 2002 20:15:21 -0000 1.160 @@ -1172,6 +1172,7 @@ virtual void hot ( sgVec3 s, sgMat4 m, int test_needed ) = 0 ; virtual void los ( sgVec3 s, sgMat4 m, int test_needed ) = 0 ; virtual void print ( FILE *fd = stderr, char *indent = "", int how_much = 2 ) ; + virtual void getStats ( int *num_branches, int *num_leaves, int *num_tris, int *num_vertices ) = 0 ; virtual int load ( FILE *fd ) ; virtual int save ( FILE *fd ) ; } ; @@ -1262,6 +1263,7 @@ virtual void recalcBSphere () = 0 ; virtual const char *getTypeName(void) ; virtual void print ( FILE *fd = stderr, char *indent = "", int how_much = 2 ) ; + virtual void getStats ( int *num_branches, int *num_leaves, int *num_tris, int *num_vertices ) ; virtual int load ( FILE *fd ) ; virtual int save ( FILE *fd ) ; @@ -1606,6 +1608,7 @@ virtual void hot ( sgVec3 s, sgMat4 m, int test_needed ) ; virtual void los ( sgVec3 s, sgMat4 m, int test_needed ) ; virtual void print ( FILE *fd = stderr, char *indent = "", int how_much = 2 ) ; + virtual void getStats ( int *num_branches, int *num_leaves, int *num_tris, int *num_vertices ) ; virtual int load ( FILE *fd ) ; virtual int save ( FILE *fd ) ; virtual void recalcBSphere () ; Index: ssgBranch.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgBranch.cxx,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- ssgBranch.cxx 26 Oct 2002 19:19:25 -0000 1.22 +++ ssgBranch.cxx 4 Dec 2002 20:15:22 -0000 1.23 @@ -155,6 +155,28 @@ } +void ssgBranch::getStats ( int *num_branches, int *num_leaves, int *num_tris, int *num_verts ) +{ + int nb, nl, nt, nv ; + + *num_branches = 1 ; /* this! */ + *num_leaves = 0 ; + *num_tris = 0 ; + *num_verts = 0 ; + + for ( int i = 0 ; i < getNumKids () ; i++ ) + { + ssgEntity *e = getKid ( i ) ; + + e -> getStats ( & nb, & nl, & nt, & nv ) ; + *num_branches += nb ; + *num_leaves += nl ; + *num_tris += nt ; + *num_verts += nv ; + } +} + + ssgEntity *ssgBranch::getByName ( char *match ) { if ( getName() != NULL && strcmp ( getName(), match ) == 0 ) Index: ssgLeaf.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLeaf.cxx,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- ssgLeaf.cxx 2 Sep 2002 06:05:48 -0000 1.20 +++ ssgLeaf.cxx 4 Dec 2002 20:15:22 -0000 1.21 @@ -156,6 +156,17 @@ } +void ssgLeaf::getStats ( int *num_branches, int *num_leaves, int *num_tris, int *num_verts ) +{ + int nb, nl, nt, nv ; + + *num_branches = 0 ; + *num_leaves = 1 ; /* this! */ + *num_tris = getNumTriangles () ; + *num_verts = getNumVertices () ; +} + + void ssgLeaf::print ( FILE *fd, char *indent, int how_much ) { if ( how_much == 0 ) |
From: Steve B. <sj...@us...> - 2002-12-04 19:12:38
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv21636/plib/src/ssg Modified Files: ssgOptimiser.cxx ssgTween.cxx Log Message: Fixed a crash in the ssgTween destructor function. Fixed a problem in ssgOptimiser that caused it to optimise several ssgBranch derived-types inappropriately. Also prevented optimisation of ssgTween nodes altogether since this tends to have disasterous consequences! Index: ssgOptimiser.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgOptimiser.cxx,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- ssgOptimiser.cxx 3 Oct 2002 03:33:30 -0000 1.29 +++ ssgOptimiser.cxx 4 Dec 2002 19:12:34 -0000 1.30 @@ -474,7 +474,8 @@ build_leaf_list ( k, leaf_list ) ; } } - else if ( ent -> isAKindOf ( ssgTypeLeaf () ) ) + else + if ( ent -> isAKindOf ( ssgTypeLeaf () ) && ! ent -> isAKindOf ( ssgTypeTween() ) ) { ssgLeaf *l = (ssgLeaf *) ent ; @@ -621,27 +622,28 @@ for ( ssgEntity *k = b_ent -> getKid ( 0 ) ; k != NULL ; [...167 lines suppressed...] @@ -1021,11 +1037,12 @@ * ent -- the entity to process * trans -- transform */ + void ssgTransTool ( ssgEntity *ent, const sgMat4 trans ) { if ( ent -> isAKindOf ( ssgTypeLeaf () ) ) { - ((ssgLeaf *) ent) -> transform ( trans ) ; + ((ssgLeaf *) ent) -> transform ( trans ) ; return ; } @@ -1066,3 +1083,5 @@ b_ent -> recalcBSphere () ; } + + Index: ssgTween.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgTween.cxx,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- ssgTween.cxx 10 Nov 2002 17:12:13 -0000 1.11 +++ ssgTween.cxx 4 Dec 2002 19:12:35 -0000 1.12 @@ -210,6 +210,14 @@ ssgTween::~ssgTween () { + /* Need to ref these one more time to avoid problems when the base class destructor + deletes them */ + + vertices -> ref () ; + normals -> ref () ; + texcoords -> ref () ; + colours -> ref () ; + for ( int i = 0 ; i < getNumBanks () ; i++ ) { ssgDeRefDelete ( (ssgVertexArray *) banked_vertices -> getEntity (i)) ; |
From: Steve B. <sj...@us...> - 2002-12-02 15:04:09
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv11399/plib/src/ssg Modified Files: ssgContext.cxx Log Message: Fixed uninitialised variable in ssgContext. Index: ssgContext.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgContext.cxx,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- ssgContext.cxx 10 Nov 2002 17:12:13 -0000 1.19 +++ ssgContext.cxx 2 Dec 2002 15:04:06 -0000 1.20 @@ -44,11 +44,11 @@ makeCurrent () ; currentState = NULL ; basicState = NULL ; - //orthographic = FALSE ; + //orthographic = FALSE ; cullFace = TRUE ; ovTexture = FALSE ; ovCullface = FALSE ; - + ovState = NULL ; sgCopyMat4 ( cameraMatrix, _ssgOpenGLAxisSwapMatrix ) ; frustum = new sgFrustum ; @@ -66,6 +66,7 @@ /* The order of the two following lines is essential. setTexture(NULL) currently sets the TEXTURE bit in dont_care... not the desired effect here. /PL */ + basicState->setTexture ( (ssgTexture*) NULL ) ; basicState->dont_care = 0 ; basicState->colour_material_mode = GL_AMBIENT_AND_DIFFUSE ; |
From: Steve B. <sj...@us...> - 2002-12-01 18:21:51
|
Update of /cvsroot/plib/plib/src/fnt In directory sc8-pr-cvs1:/tmp/cvs-serv20761/plib/src/fnt Modified Files: fntTXF.cxx Log Message: Fixed some conditional compilation for Windoze. Index: fntTXF.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/fnt/fntTXF.cxx,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- fntTXF.cxx 30 Nov 2002 00:41:49 -0000 1.18 +++ fntTXF.cxx 1 Dec 2002 18:21:46 -0000 1.19 @@ -27,7 +27,9 @@ #ifdef UL_MACINTOSH # include <agl.h> #elif defined(UL_MAC_OSX) -# include <OpenGL/CGLCurrent.h> +# include <OpenGL/CGLCurrent.h> +#elif defined(UL_WIN32) + /* Nothing */ #else # include <GL/glx.h> #endif |
From: Steve B. <sj...@us...> - 2002-12-01 18:21:51
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv20761/plib/src/ssg Modified Files: ssg.cxx Log Message: Fixed some conditional compilation for Windoze. Index: ssg.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssg.cxx,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- ssg.cxx 30 Nov 2002 00:41:49 -0000 1.61 +++ ssg.cxx 1 Dec 2002 18:21:47 -0000 1.62 @@ -29,6 +29,8 @@ # include <agl.h> #elif defined(UL_MAC_OSX) # include <OpenGL/CGLCurrent.h> +#elif defined(UL_WIN32) + /* Nothing */ #else # include <GL/glx.h> #endif |
From: Steve B. <sj...@us...> - 2002-12-01 18:21:51
|
Update of /cvsroot/plib/plib/src/pui In directory sc8-pr-cvs1:/tmp/cvs-serv20761/plib/src/pui Modified Files: pu.cxx Log Message: Fixed some conditional compilation for Windoze. Index: pu.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/pu.cxx,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- pu.cxx 30 Nov 2002 00:41:49 -0000 1.62 +++ pu.cxx 1 Dec 2002 18:21:47 -0000 1.63 @@ -26,7 +26,9 @@ #if defined(UL_MACINTOSH) # include <agl.h> #elif defined(UL_MAC_OSX) -# include <OpenGL/CGLCurrent.h> +# include <OpenGL/CGLCurrent.h> +#elif defined(UL_WIN32) + /* Nothing */ #else # include <GL/glx.h> #endif |
From: Steve B. <sj...@us...> - 2002-12-01 18:21:51
|
Update of /cvsroot/plib/plib/src/util In directory sc8-pr-cvs1:/tmp/cvs-serv20761/plib/src/util Modified Files: ulClock.cxx Log Message: Fixed some conditional compilation for Windoze. Index: ulClock.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/util/ulClock.cxx,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ulClock.cxx 29 Nov 2002 19:39:48 -0000 1.9 +++ ulClock.cxx 1 Dec 2002 18:21:48 -0000 1.10 @@ -29,8 +29,10 @@ #ifdef UL_CYGWIN typedef long long _int64; #define LARGEINTEGER _int64 -#else -#include <sys/time.h> +#endif + +#ifndef UL_WIN32 +# include <sys/time.h> #endif #include <time.h> |
From: Steve B. <sj...@us...> - 2002-11-30 15:52:42
|
Update of /cvsroot/plib/plib/src/js In directory sc8-pr-cvs1:/tmp/cvs-serv8728/plib/src/js Modified Files: Makefile.am README Added Files: jsNone.cxx Log Message: Added non-support for IRIX/SOLARIS. --- NEW FILE: jsNone.cxx --- /* Copyright (C) 1998,2002 Steve Baker This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA For further information visit http://plib.sourceforge.net $Id: jsNone.cxx,v 1.1 2002/11/30 15:52:38 sjbaker Exp $ */ #include "js.h" #if defined(UL_IRIX) || defined(UL_SOLARIS) /* check the joystick driver version */ void jsJoystick::open () { error = TRUE ; num_axes = num_buttons = 0 ; } void jsJoystick::close () { error = TRUE ; } jsJoystick::jsJoystick ( int ident ) { error = TRUE ; num_axes = num_buttons = 0 ; } void jsJoystick::rawRead ( int *buttons, float *axes ) { if ( buttons != NULL ) *buttons = 0 ; } #endif Index: Makefile.am =================================================================== RCS file: /cvsroot/plib/plib/src/js/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Makefile.am 29 Nov 2002 19:39:48 -0000 1.8 +++ Makefile.am 30 Nov 2002 15:52:38 -0000 1.9 @@ -5,7 +5,7 @@ include_HEADERS = js.h libplibjs_a_SOURCES = js.cxx jsLinux.cxx jsLinuxOld.cxx jsMacOS.cxx \ - jsWindows.cxx jsBSD.cxx + jsWindows.cxx jsBSD.cxx jsNone.cxx INCLUDES = -I$(top_srcdir)/src/util Index: README =================================================================== RCS file: /cvsroot/plib/plib/src/js/README,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- README 29 Nov 2002 19:39:48 -0000 1.1 +++ README 30 Nov 2002 15:52:38 -0000 1.2 @@ -21,3 +21,10 @@ jsBSD.cxx jsMacOS.cxx +...for OS's (eg IRIX and SOLARIS) without standard joystick +functionality, we add: + + jsNone.cxx + +...which safely returns error status with no buttons or axes provided. + |
From: Steve B. <sj...@us...> - 2002-11-30 13:18:59
|
Update of /cvsroot/plib/plib/src/sl In directory sc8-pr-cvs1:/tmp/cvs-serv491/plib/src/sl Modified Files: sl.h slPortability.h Log Message: Fixed a couple of conditional compilations for MacOSX. Index: sl.h =================================================================== RCS file: /cvsroot/plib/plib/src/sl/sl.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- sl.h 30 Nov 2002 00:41:49 -0000 1.18 +++ sl.h 30 Nov 2002 13:18:56 -0000 1.19 @@ -115,7 +115,7 @@ #endif -#if !defined(UL_WIN32) && !defined(UL_MACINTOSH) +#if !defined(UL_WIN32) && !defined(UL_MACINTOSH) && !defined(UL_MAC_OSX) int ioctl ( int cmd, int param = 0 ) { if ( error ) return param ; Index: slPortability.h =================================================================== RCS file: /cvsroot/plib/plib/src/sl/slPortability.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- slPortability.h 30 Nov 2002 00:41:49 -0000 1.12 +++ slPortability.h 30 Nov 2002 13:18:56 -0000 1.13 @@ -33,12 +33,15 @@ #include <stdio.h> #include <stdlib.h> -#ifdef UL_MAC_OSX +#ifdef UL_MACINTOSH #include <Sound.h> #include <Timer.h> #ifdef __MWERKS__ #include <unix.h> #endif +#endif + +#ifdef UL_MAC_OSX #include <Carbon/Carbon.h> #endif |
From: Steve B. <sj...@us...> - 2002-11-30 00:41:53
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv1232/plib/src/ssg Modified Files: ssg.cxx ssg.h ssgLoadASE.cxx ssgLoadFLT.cxx ssgLoadTexture.cxx Log Message: Cleared up some compile errors...replaced more ad-hoc ifdef's with UL_whatever tokens. Index: ssg.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssg.cxx,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- ssg.cxx 26 Oct 2002 19:00:55 -0000 1.60 +++ ssg.cxx 30 Nov 2002 00:41:49 -0000 1.61 @@ -25,25 +25,23 @@ #define _UL_GENERATE_CODE_ #include "ssgLocal.h" -#ifndef WIN32 -# if defined(macintosh) -# include <agl.h> -# elif defined(__APPLE__) -# include <OpenGL/CGLCurrent.h> -# else -# include <GL/glx.h> -# endif +#if defined(UL_MACINTOSH) +# include <agl.h> +#elif defined(UL_MAC_OSX) +# include <OpenGL/CGLCurrent.h> +#else +# include <GL/glx.h> #endif static bool glIsValidContext ( void ) { #if defined(CONSOLE) return true ; -#elif defined(WIN32) +#elif defined(UL_WIN32) return ( wglGetCurrentContext () != NULL ) ; -#elif defined(macintosh) +#elif defined(UL_MACINTOSH) return ( aglGetCurrentContext () != NULL ) ; -#elif defined(__APPLE__) +#elif defined(UL_MAC_OSX) return ( CGLGetCurrentContext () != NULL ) ; #else return ( glXGetCurrentContext () != NULL ) ; Index: ssg.h =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssg.h,v retrieving revision 1.158 retrieving revision 1.159 diff -u -d -r1.158 -r1.159 --- ssg.h 29 Nov 2002 19:39:48 -0000 1.158 +++ ssg.h 30 Nov 2002 00:41:49 -0000 1.159 @@ -27,7 +27,7 @@ #include "sg.h" -#ifdef __APPLE__ +#ifdef UL_MAC_OSX # include <OpenGL/gl.h> #else # include <GL/gl.h> Index: ssgLoadASE.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadASE.cxx,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- ssgLoadASE.cxx 15 Sep 2002 01:29:11 -0000 1.45 +++ ssgLoadASE.cxx 30 Nov 2002 00:41:50 -0000 1.46 @@ -61,10 +61,6 @@ #include "ssgLocal.h" #include "ssgParser.h" -#ifndef _WIN32 -#define stricmp strcasecmp -#define strnicmp strncasecmp -#endif #define u32 unsigned int #define f32 float @@ -323,7 +319,11 @@ static ssgSimpleState* get_state( aseMaterial* mat, bool prelit ) { // is material an ifl (image file list) +#ifdef UL_WIN32 if ( strnicmp ( "ifl_", mat -> name, 4 ) == 0 ) +#else + if ( strncasecmp ( "ifl_", mat -> name, 4 ) == 0 ) +#endif { u32 num_subs = count_sub_materials ( mat -> mat_index ); if ( num_subs < 2 ) Index: ssgLoadFLT.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadFLT.cxx,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- ssgLoadFLT.cxx 9 Sep 2002 09:01:29 -0000 1.34 +++ ssgLoadFLT.cxx 30 Nov 2002 00:41:50 -0000 1.35 @@ -90,9 +90,9 @@ /*#define NO_COLORS*/ /* Try to figure out how to do mmap. */ -#ifdef _WIN32 +#ifdef UL_WIN32 # define USE_WIN32_MMAP -#elif defined(__sgi) || defined(__GNUC__) /* OK? Any Unix dialect should work. */ +#else # include <unistd.h> # ifdef _POSIX_MAPPED_FILES # define USE_POSIX_MMAP @@ -103,7 +103,7 @@ #include <string.h> #include <fcntl.h> #include <stdio.h> -#ifdef __sgi +#ifdef UL_IRIX # include <sys/endian.h> #endif #ifdef USE_POSIX_MMAP @@ -112,7 +112,7 @@ # include <sys/stat.h> # include <sys/mman.h> #endif -#ifdef _MSC_VER +#ifdef UL_MSVC # include <io.h> #endif @@ -142,7 +142,7 @@ typedef unsigned char ubyte; -#ifdef _WIN32 +#ifdef UL_WIN32 typedef unsigned short ushort; typedef unsigned int uint; #endif @@ -157,7 +157,7 @@ /* XXX what about PDP_ENDIAN? */ /* Help! Is this correct? */ -#if (!defined(BYTE_ORDER) && defined(WIN32) && !defined(NOT_INTEL_BYTE_ORDER)) +#if (!defined(BYTE_ORDER) && defined(UL_WIN32) && !defined(NOT_INTEL_BYTE_ORDER)) # define LITTLE_ENDIAN 1234 # define BIG_ENDIAN 4321 # define BYTE_ORDER LITTLE_ENDIAN Index: ssgLoadTexture.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadTexture.cxx,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- ssgLoadTexture.cxx 2 Sep 2002 06:05:48 -0000 1.16 +++ ssgLoadTexture.cxx 30 Nov 2002 00:41:50 -0000 1.17 @@ -244,7 +244,7 @@ } // ****** found original file. convert it. ****** -#ifdef WIN32 +#ifdef UL_WIN32 char command [ 1024 ] ; sprintf(command, "imconvert -verbose %s sgi:%s", fname_input, fname_output); unsigned int ui = WinExec(command, SW_HIDE ); |
From: Steve B. <sj...@us...> - 2002-11-30 00:41:53
|
Update of /cvsroot/plib/plib/src/util In directory sc8-pr-cvs1:/tmp/cvs-serv1232/plib/src/util Modified Files: ul.h ulList.cxx Log Message: Cleared up some compile errors...replaced more ad-hoc ifdef's with UL_whatever tokens. Index: ul.h =================================================================== RCS file: /cvsroot/plib/plib/src/util/ul.h,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- ul.h 29 Nov 2002 19:39:48 -0000 1.56 +++ ul.h 30 Nov 2002 00:41:50 -0000 1.57 @@ -70,11 +70,19 @@ #elif defined(__APPLE__) -#define UL_MAX_OSX 1 +#define UL_MAC_OSX 1 #elif defined(__linux__) #define UL_LINUX 1 + +#elif defined(__sgi) + +#define UL_IRIX 1 + +#elif defined(SOLARIS) + +#define UL_SOLARIS 1 #elif (defined(__unix__) || defined(unix)) && !defined(USG) Index: ulList.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/util/ulList.cxx,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ulList.cxx 26 Oct 2002 13:52:13 -0000 1.6 +++ ulList.cxx 30 Nov 2002 00:41:50 -0000 1.7 @@ -22,14 +22,8 @@ */ -#include <stdio.h> -#include <stdlib.h> -#if defined(WIN32) -#include <windows.h> -#include <mmsystem.h> -#endif - #include "ul.h" + ulList::ulList ( int init ) { |
From: Steve B. <sj...@us...> - 2002-11-30 00:41:53
|
Update of /cvsroot/plib/plib/src/fnt In directory sc8-pr-cvs1:/tmp/cvs-serv1232/plib/src/fnt Modified Files: fnt.h fntTXF.cxx Log Message: Cleared up some compile errors...replaced more ad-hoc ifdef's with UL_whatever tokens. Index: fnt.h =================================================================== RCS file: /cvsroot/plib/plib/src/fnt/fnt.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- fnt.h 26 Oct 2002 14:24:59 -0000 1.13 +++ fnt.h 30 Nov 2002 00:41:49 -0000 1.14 @@ -27,7 +27,7 @@ #include "sg.h" -#ifdef __APPLE__ +#ifdef UL_MAC_OSX # include <OpenGL/gl.h> #else # include <GL/gl.h> Index: fntTXF.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/fnt/fntTXF.cxx,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- fntTXF.cxx 9 Nov 2002 21:27:21 -0000 1.17 +++ fntTXF.cxx 30 Nov 2002 00:41:49 -0000 1.18 @@ -24,25 +24,23 @@ #include "fntLocal.h" -#ifndef WIN32 -# if defined(macintosh) -# include <agl.h> -# elif defined(__APPLE__) +#ifdef UL_MACINTOSH +# include <agl.h> +#elif defined(UL_MAC_OSX) # include <OpenGL/CGLCurrent.h> -# else -# include <GL/glx.h> -# endif +#else +# include <GL/glx.h> #endif static bool glIsValidContext ( void ) { #if defined(CONSOLE) return true ; -#elif defined(WIN32) +#elif defined(UL_WIN32) return ( wglGetCurrentContext () != NULL ) ; -#elif defined(macintosh) +#elif defined(UL_MACINTOSH) return ( aglGetCurrentContext () != NULL ) ; -#elif defined(__APPLE__) +#elif defined(UL_MAC_OSX) return ( CGLGetCurrentContext () != NULL ) ; #else return ( glXGetCurrentContext () != NULL ) ; |
From: Steve B. <sj...@us...> - 2002-11-30 00:41:53
|
Update of /cvsroot/plib/plib/src/sl In directory sc8-pr-cvs1:/tmp/cvs-serv1232/plib/src/sl Modified Files: sl.h slDSP.cxx slMODPrivate.h slPortability.h sm.h smMixer.cxx Log Message: Cleared up some compile errors...replaced more ad-hoc ifdef's with UL_whatever tokens. Index: sl.h =================================================================== RCS file: /cvsroot/plib/plib/src/sl/sl.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- sl.h 15 Sep 2002 00:39:03 -0000 1.17 +++ sl.h 30 Nov 2002 00:41:49 -0000 1.18 @@ -29,15 +29,15 @@ #ifdef SL_USING_OSS_AUDIO #define SLDSP_DEFAULT_DEVICE "/dev/dsp" -#elif defined(WIN32) +#elif defined(UL_WIN32) #define SLDSP_DEFAULT_DEVICE "dsp" -#elif defined(BSD) +#elif defined(UL_BSD) #define SLDSP_DEFAULT_DEVICE "/dev/audio" -#elif defined(sgi) +#elif defined(UL_IRIX) #define SLDSP_DEFAULT_DEVICE "dsp" // dummy ... -#elif defined(SOLARIS) +#elif defined(UL_SOLARIS) #define SLDSP_DEFAULT_DEVICE "/dev/audio" -#elif defined(macintosh) || defined(__APPLE__) +#elif defined(UL_MACINTOSH) || defined(UL_MAC_OSX) #define SLDSP_DEFAULT_DEVICE "dsp" // dummy #else #error "Port me !" @@ -71,19 +71,19 @@ int error ; int fd ; -#if defined (__NetBSD__) || defined(__OpenBSD__) +#ifdef UL_BSD audio_info_t ainfo; // ioctl structure audio_offset_t audio_offset; // offset in audiostream long counter; // counter-written packets -#elif defined(SOLARIS) +#elif defined(UL_SOLARIS) audio_info_t ainfo; long counter; #elif defined(SL_USING_OSS_AUDIO) audio_buf_info buff_info ; -#elif defined(sgi) +#elif defined(UL_IRIX) ALconfig config; // configuration stuff ALport port; // .. we are here -#elif defined(macintosh) || defined(__APPLE__) +#elif defined(UL_MACINTOSH) || defined(UL_MAC_OSX) // Size of the data chunks written with write(). // This should be a multiple of 1024. @@ -115,7 +115,7 @@ #endif -#if !defined(WIN32) && !defined(macintosh) +#if !defined(UL_WIN32) && !defined(UL_MACINTOSH) int ioctl ( int cmd, int param = 0 ) { if ( error ) return param ; @@ -129,7 +129,7 @@ return param ; } -#elif defined(WIN32) +#elif defined(UL_WIN32) #define BUFFER_COUNT (3*8) #define BUFFER_SIZE (1024*1) Index: slDSP.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/sl/slDSP.cxx,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- slDSP.cxx 2 Sep 2002 06:05:47 -0000 1.18 +++ slDSP.cxx 30 Nov 2002 00:41:49 -0000 1.19 @@ -155,7 +155,7 @@ #endif -#ifdef WIN32 +#ifdef UL_WIN32 /* ------------------------------------------------------------ */ /* win32 */ @@ -413,7 +413,7 @@ /* NetBSD/OpenBSD 2.3 this should be very close to SUN Audio */ /* ------------------------------------------------------------ */ [...66 lines suppressed...] } @@ -625,7 +625,7 @@ /* SGI IRIX audio */ /* ------------------------------------------------------------ */ -#elif defined(sgi) +#elif defined(UL_IRIX) void slDSP::open ( const char *device, int _rate, int _stereo, int _bps ) { @@ -773,7 +773,7 @@ #endif -#if defined(macintosh) || defined(__APPLE__) +#if defined(UL_MACINTOSH) || defined(UL_MAC_OSX) // Print out debugging info when secondsUsed is called, Index: slMODPrivate.h =================================================================== RCS file: /cvsroot/plib/plib/src/sl/slMODPrivate.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- slMODPrivate.h 2 Sep 2002 06:05:47 -0000 1.6 +++ slMODPrivate.h 30 Nov 2002 00:41:49 -0000 1.7 @@ -29,7 +29,7 @@ #include <fcntl.h> #include <sys/stat.h> -#if defined( WIN32 ) && !defined( __CYGWIN32__ ) +#ifdef UL_MSVC #include <windows.h> #include <io.h> #else Index: slPortability.h =================================================================== RCS file: /cvsroot/plib/plib/src/sl/slPortability.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- slPortability.h 2 Sep 2002 06:05:47 -0000 1.11 +++ slPortability.h 30 Nov 2002 00:41:49 -0000 1.12 @@ -33,50 +33,29 @@ #include <stdio.h> #include <stdlib.h> -/* the next lines are to define BSD */ -/* see http://www.freebsd.org/handbook/porting.html for why we do this */ -#if (defined(__unix__) || defined(unix)) && !defined(USG) -#include <sys/param.h> -#endif - -#ifdef macintosh +#ifdef UL_MAC_OSX #include <Sound.h> #include <Timer.h> #ifdef __MWERKS__ #include <unix.h> #endif -#endif - -#ifdef __APPLE__ #include <Carbon/Carbon.h> #endif -#ifndef WIN32 -#include <unistd.h> -#include <sys/ioctl.h> -#else -#include <windows.h> -#ifdef __CYGWIN32__ -# define NEAR /* */ -# define FAR /* */ -# define WHERE_EVER_YOU_ARE /* Curt: optional, but it reminds me of a song */ -#endif -#include <mmsystem.h> -#endif - #include <fcntl.h> #include <sys/stat.h> #include <string.h> #include <limits.h> #include <math.h> -#if (defined(__linux__) || defined(BSD)) && !defined(__NetBSD__) +#if (defined(UL_LINUX) || defined(UL_BSD)) && !defined(__NetBSD__) #define SL_USING_OSS_AUDIO 1 #endif #ifdef SL_USING_OSS_AUDIO -# if defined(__linux__) +# if defined(UL_LINUX) # include <linux/soundcard.h> +# include <sys/ioctl.h> # elif defined(__FreeBSD__) # include <machine/soundcard.h> # else @@ -92,20 +71,19 @@ # endif #endif -#if defined (__NetBSD__) || defined(__OpenBSD__) +#ifdef UL_BSD # include <sys/audioio.h> #endif /* Tom */ -#ifdef sgi +#ifdef UL_IRIX # include <audio.h> #endif -#if defined(__svr4__) || defined(__SVR4) +#ifdef UL_SOLARIS # include <sys/audioio.h> # include <sys/stropts.h> -# define SOLARIS #endif #endif Index: sm.h =================================================================== RCS file: /cvsroot/plib/plib/src/sl/sm.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- sm.h 2 Sep 2002 06:05:47 -0000 1.5 +++ sm.h 30 Nov 2002 00:41:49 -0000 1.6 @@ -29,7 +29,7 @@ #ifdef SL_USING_OSS_AUDIO #define SMMIXER_DEFAULT_DEVICE "/dev/mixer" -#elif defined(WIN32) +#elif defined(UL_WIN32) #define SMMIXER_DEFAULT_DEVICE "mixer" #else #endif Index: smMixer.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/sl/smMixer.cxx,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- smMixer.cxx 2 Sep 2002 06:05:47 -0000 1.8 +++ smMixer.cxx 30 Nov 2002 00:41:49 -0000 1.9 @@ -179,7 +179,7 @@ setVolume ( SOUND_MIXER_CD , left, right ) ; } -#elif defined(__NetBSD__) || defined(__OpenBSD__) +#elif defined(UL_BSD) /* ------------------------------------------------------------ */ /* NetBSD or OpenBSD 2.3 */ |