Update of /cvsroot/plib/plib/src/ssg
In directory usw-pr-cvs1:/tmp/cvs-serv20459/plib/src/ssg
Modified Files:
Makefile.am ssg.cxx ssg.h ssgconf.h
Added Files:
ssgLoadXPlaneObj.cxx
Log Message:
Added Bernie Bright's XPlane loader. Fixed some more 'gotcha's in PSL.
--- NEW FILE: ssgLoadXPlaneObj.cxx ---
/*
PLIB - A Suite of Portable Game Libraries
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
[...423 lines suppressed...]
ulSetError( UL_WARNING,
"ssgLoadXPlaneObj: invalid line, '%s'", line );
fclose(fp);
delete root;
return 0;
}
}
while ((p = getline( line, sizeof(line), fp )) != 0 && type != 99);
}
fclose( fp );
return root;
}
ssgEntity*
ssgLoadXPlaneOBJ( const char* fname, const ssgLoaderOptions* options )
{
ObjLoader loader( options );
return loader.load( fname );
}
Index: Makefile.am
===================================================================
RCS file: /cvsroot/plib/plib/src/ssg/Makefile.am,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- Makefile.am 31 Aug 2002 22:36:07 -0000 1.38
+++ Makefile.am 27 Sep 2002 15:45:06 -0000 1.39
@@ -24,7 +24,7 @@
ssgSaveVRML1.cxx ssgLoaderWriterStuff.h ssgMSFSPalette.h ssg3ds.h \
ssgLoadMDL.h ssgSave3ds.cxx ssgAxisTransform.cxx ssgLoadATG.cxx \
ssgSaveATG.cxx ssgLoadIV.cxx ssgLoad.cxx ssgLoadVRML.h \
- ssgLoadMDL_BGLTexture.cxx
+ ssgLoadMDL_BGLTexture.cxx ssgLoadXPlaneObj.cxx
INCLUDES = -I$(top_srcdir)/src/sg -I$(top_srcdir)/src/util
Index: ssg.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/ssg/ssg.cxx,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- ssg.cxx 2 Sep 2002 06:05:47 -0000 1.57
+++ ssg.cxx 27 Sep 2002 15:45:06 -0000 1.58
@@ -143,7 +143,6 @@
ssgAddModelFormat ( ".wrl", ssgLoadVRML1, ssgSaveVRML1 ) ;
ssgAddModelFormat ( ".iv", ssgLoadIV , NULL ) ;
-
#ifdef SSG_LOAD_MDL_SUPPORTED
ssgAddModelFormat ( ".mdl", ssgLoadMDL , NULL ) ;
#endif
@@ -199,6 +198,9 @@
ssgAddTextureFormat ( ".ngt" , ssgLoadMDLTexture ) ;
#endif
+#ifdef SSG_LOAD_XPL_SUPPORTED
+ ssgAddModelFormat ( ".xpl", ssgLoadXPlaneOBJ , NULL ) ;
+#endif
}
Index: ssg.h
===================================================================
RCS file: /cvsroot/plib/plib/src/ssg/ssg.h,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -d -r1.149 -r1.150
--- ssg.h 15 Sep 2002 01:29:11 -0000 1.149
+++ ssg.h 27 Sep 2002 15:45:06 -0000 1.150
@@ -2654,7 +2654,8 @@
ssgEntity *ssgLoadOFF ( const char *fname, const ssgLoaderOptions *options = NULL ) ;
ssgEntity *ssgLoadATG ( const char *fname, const ssgLoaderOptions *options = NULL ) ;
ssgEntity *ssgLoadVRML1( const char *fname, const ssgLoaderOptions* options = NULL ) ;
-ssgEntity *ssgLoadIV( const char *fname, const ssgLoaderOptions* options = NULL ) ;
+ssgEntity *ssgLoadIV ( const char *fname, const ssgLoaderOptions* options = NULL ) ;
+ssgEntity *ssgLoadXPlaneOBJ ( const char *fname, const ssgLoaderOptions *options = NULL ) ;
typedef ssgEntity *ssgLoadFunc ( const char *, const ssgLoaderOptions * ) ;
Index: ssgconf.h
===================================================================
RCS file: /cvsroot/plib/plib/src/ssg/ssgconf.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- ssgconf.h 2 Sep 2002 06:05:49 -0000 1.10
+++ ssgconf.h 27 Sep 2002 15:45:06 -0000 1.11
@@ -50,4 +50,5 @@
#define SSG_LOAD_BMP_SUPPORTED
#define SSG_LOAD_MDL_SUPPORTED
#define SSG_LOAD_MDL_BGL_TEXTURE_SUPPORTED
+#define SSG_LOAD_XPL_SUPPORTED
#endif
|