[Plib-cvs] plib/src/ssg ssgLoadBGL.h,NONE,1.1 ssg.cxx,1.54,1.55 ssg.h,1.138,1.139 ssgLoadBGL.cxx,1.9
Brought to you by:
sjbaker
From: J?rgen M. <j_m...@us...> - 2002-07-20 11:58:23
|
Update of /cvsroot/plib/plib/src/ssg In directory usw-pr-cvs1:/tmp/cvs-serv24388/src/ssg Modified Files: ssg.cxx ssg.h ssgLoadBGL.cxx ssgLoadMDL.h Added Files: ssgLoadBGL.h Log Message: - Layer Call & Layer Call 32 added - Layering for ground textures added - Single line drawing changed again to support one dot in start / end surface context - fixed texture size for polygons with no texture coordinates - reworked building generation (4 different shapes are generated) - support background textures with correct layering - checked re-usage of loaded vertices more carfully (i.e. condsider its normal before re-using them). --- NEW FILE: ssgLoadBGL.h --- /* PLIB - A Suite of Portable Game Libraries Copyright (C) 2001 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 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA For further information visit http://plib.sourceforge.net $Id: ssgLoadBGL.h,v 1.1 2002/07/20 11:58:20 j_marquardt Exp $ */ //=========================================================================== // // File: ssgLoadBGL.h // // Created: Tue Feb 29 22:20:31 2000 // // Author: Juergen Marquardt <jue...@t-...> // // //=========================================================================== // Copyright (c) 2002 Jürgen Marquardt <jue...@t-...> //=========================================================================== // common shininess for all objects other than background surface #define DEF_SHININESS 50 #ifdef JMDEBUG #include <iostream> #define JMPRINT(x,y) cout.flags(x); cout << y << "\n" #else #define JMPRINT(x,y) #endif #ifdef PRINT_JOHN #define PRINT_JOHN(x) PRINT_JOHN(x) #define PRINT_JOHN2(x,y) PRINT_JOHN2(x,y) #define PRINT_JOHN3(x,y,z) PRINT_JOHN3(x,y,z) #else #define PRINT_JOHN(x) #define PRINT_JOHN2(x,y) #define PRINT_JOHN3(x,y,z) #endif #define EARTH_RADIUS 6367311.808 #define MAX_PATH_LENGTH 1024 #define RUNAWAY_LAYER 24 #define ZERO_LAYER 24 #undef ABS #undef MIN #undef MAX #define ABS(x) ((x) >= 0 ? (x) : -(x)) #define MIN(a,b) ((a) <= (b) ? (a) : (b)) #define MAX(a,b) ((a) >= (b) ? (a) : (b)) #define MIN3(a,b,c) ((a) <= (b) ? MIN(a,c) : MIN(b,c)) #define MAX3(a,b,c) ((a) >= (b) ? MAX(a,c) : MAX(b,c)) // type definitions // class declarations class ssgLayeredVtxArray : public ssgVtxArray { public: ssgLayeredVtxArray ( unsigned int, ssgVertexArray *, ssgNormalArray *, ssgTexCoordArray *, ssgColourArray *, ssgIndexArray * ); bool isOnGround(); void moveToBackground(); }; // function declarations static void parse_proc_scenery(FILE*); static ssgBranch *ssgLoadBGLFile(const char * ); Index: ssg.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssg.cxx,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- ssg.cxx 10 Jun 2002 20:58:03 -0000 1.54 +++ ssg.cxx 20 Jul 2002 11:58:20 -0000 1.55 @@ -150,6 +150,7 @@ #ifdef SSG_LOAD_BGL_SUPPORTED ssgAddModelFormat ( ".bgl", ssgLoadBGL , NULL ) ; + ssgAddModelFormat ( ".bgb", ssgLoadBGLBatch , NULL ) ; #endif #ifdef SSG_LOAD_TGA_SUPPORTED @@ -197,6 +198,10 @@ ssgAddTextureFormat ( ".pat" , ssgLoadMDLTexture ) ; ssgAddTextureFormat ( ".r8" , ssgLoadMDLTexture ) ; ssgAddTextureFormat ( ".naz" , ssgLoadMDLTexture ) ; + ssgAddTextureFormat ( ".ktx" , ssgLoadMDLTexture ) ; + ssgAddTextureFormat ( ".oav" , ssgLoadMDLTexture ) ; + ssgAddTextureFormat ( ".sky" , ssgLoadMDLTexture ) ; + ssgAddTextureFormat ( ".ngt" , ssgLoadMDLTexture ) ; #endif } Index: ssg.h =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssg.h,v retrieving revision 1.138 retrieving revision 1.139 diff -u -d -r1.138 -r1.139 --- ssg.h 10 Jun 2002 16:07:13 -0000 1.138 +++ ssg.h 20 Jul 2002 11:58:20 -0000 1.139 @@ -2628,6 +2628,7 @@ ssgEntity *ssgLoadMD2 ( const char *fname, const ssgLoaderOptions *options = NULL ) ; ssgEntity *ssgLoadMDL ( const char *fname, const ssgLoaderOptions *options = NULL ) ; ssgEntity *ssgLoadBGL ( const char *fname, const ssgLoaderOptions *options = NULL ) ; +ssgEntity *ssgLoadBGLBatch ( const char *fname, const ssgLoaderOptions *options = NULL ) ; ssgEntity *ssgLoadX ( const char *fname, const ssgLoaderOptions *options = NULL ) ; ssgEntity *ssgLoadFLT ( const char *fname, const ssgLoaderOptions *options = NULL ) ; ssgEntity *ssgLoadM ( const char *fname, const ssgLoaderOptions *options = NULL ) ; Index: ssgLoadBGL.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadBGL.cxx,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ssgLoadBGL.cxx 10 Jul 2002 10:10:38 -0000 1.9 +++ ssgLoadBGL.cxx 20 Jul 2002 11:58:20 -0000 1.10 @@ -1,17 +1,17 @@ /* PLIB - A Suite of Portable Game Libraries Copyright (C) 2001 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. - + [...3336 lines suppressed...] break; - } //end of bgl parse switch + } // end of bgl parse switch if (skip_offset > 0) fseek( fp, skip_offset, SEEK_CUR ); - - } //end of bgl parse while loop - } // end of bgl "object header opcode" while loop - - fclose(fp); + } // end of bgl parse while loop - return model_; + } // end of bgl "object header opcode" while loop } #else Index: ssgLoadMDL.h =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadMDL.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ssgLoadMDL.h 9 Jun 2002 15:30:39 -0000 1.8 +++ ssgLoadMDL.h 20 Jul 2002 11:58:20 -0000 1.9 @@ -308,7 +308,7 @@ { 0x41, "BGL_SHADOW_VICALL" , 6 }, { 0x42, "BGL_POLYGON_RUNWAY" , 40 }, { 0x43, "BGL_TEXTURE2" , -1 }, - { 0x44, "BGL_TEXTURE_RUNWAY" , 40 }, + { 0x44, "BGL_TEXTURE_RUNWAY" , 64 }, // 40 { 0x45, "OBSOLETE 0x45" , 16 }, { 0x46, "BGL_POINT_VICALL" , 22 }, { 0x47, "RESERVED" , 4 }, |