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 );
|