Main Page | Namespace List | Class Hierarchy | Compound List | File List | Compound Members | File Members

ssgLocal.h

Go to the documentation of this file.
00001 /*
00002      PLIB - A Suite of Portable Game Libraries
00003      Copyright (C) 1998,2002  Steve Baker
00004 
00005      This library is free software; you can redistribute it and/or
00006      modify it under the terms of the GNU Library General Public
00007      License as published by the Free Software Foundation; either
00008      version 2 of the License, or (at your option) any later version.
00009  
00010      This library is distributed in the hope that it will be useful,
00011      but WITHOUT ANY WARRANTY; without even the implied warranty of
00012      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013      Library General Public License for more details.
00014  
00015      You should have received a copy of the GNU Library General Public
00016      License along with this library; if not, write to the Free Software
00017      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00018  
00019      For further information visit http://plib.sourceforge.net
00020 
00021      $Id: ssgLocal.h,v 1.21 2002/09/02 06:05:48 sjbaker Exp $
00022 */
00023 
00024 #ifndef SSGLOCAL_H
00025 #define SSGLOCAL_H
00026 
00027 #include <plib/ssg.h>
00028 
00029 void _ssgStartOfFrameInit  () ;
00030 void _ssgEndOfFrameCleanup () ;
00031 
00032 
00033 extern void (*__ssgEnableTable[64])() ;
00034 extern void (*__ssgDisableTable[64])() ;
00035 
00036 extern sgMat4 _ssgOpenGLAxisSwapMatrix ;
00037 extern int    _ssgIsHotTest ;
00038 extern int    _ssgIsLosTest ;
00039 extern int    _ssgFileVersionNumber ;
00040 
00041 void _ssgForceLineState () ;
00042 
00043 void _ssgDrawDList () ;
00044 void _ssgPushMatrix ( sgMat4 m ) ;
00045 void _ssgPopMatrix  () ;
00046 void _ssgLoadMatrix ( sgMat4 m ) ;
00047 void _ssgLoadTexMatrix ( sgMat4 m ) ;
00048 void _ssgUnloadTexMatrix () ;
00049 void _ssgDrawLeaf   ( ssgLeaf *l ) ;
00050 
00051 void _ssgAddHit ( ssgLeaf *l, int trinum, sgMat4 mat, sgVec4 pl ) ;
00052 void _ssgPushPath ( ssgEntity *l ) ;
00053 void _ssgPopPath () ;
00054 
00055 extern int stats_num_vertices    ;
00056 extern int stats_num_leaves      ;
00057 extern int stats_isect_triangles ;
00058 extern int stats_cull_test       ;
00059 extern int stats_isect_test      ;
00060 extern int stats_bind_textures   ;
00061 
00062 extern int stats_hot_triangles   ;
00063 extern int stats_hot_test        ;
00064 extern int stats_hot_no_trav     ;
00065 extern int stats_hot_radius_reject ;
00066 extern int stats_hot_triv_accept ;
00067 extern int stats_hot_straddle    ;
00068 
00069 extern int stats_los_triangles   ;
00070 extern int stats_los_test        ;
00071 extern int stats_los_no_trav     ;
00072 extern int stats_los_radius_reject ;
00073 extern int stats_los_triv_accept ;
00074 extern int stats_los_straddle    ;
00075 
00076 extern ssgState *( *_ssgGetAppState)( char *) ;
00077 
00078 void _ssgReadFloat   ( FILE *fd,                float *var ) ;
00079 void _ssgWriteFloat  ( FILE *fd, const          float  var ) ;
00080 void _ssgReadUInt    ( FILE *fd,       unsigned int   *var ) ;
00081 void _ssgWriteUInt   ( FILE *fd, const unsigned int    var ) ;
00082 void _ssgReadInt     ( FILE *fd,                int   *var ) ;
00083 void _ssgWriteInt    ( FILE *fd, const          int    var ) ;
00084 void _ssgReadUShort  ( FILE *fd,       unsigned short *var ) ;
00085 void _ssgWriteUShort ( FILE *fd, const unsigned short  var ) ;
00086 void _ssgReadShort   ( FILE *fd,                short *var ) ;
00087 void _ssgWriteShort  ( FILE *fd, const          short  var ) ;
00088 
00089 void _ssgReadFloat   ( FILE *fd, const unsigned int n,                float *var ) ;
00090 void _ssgWriteFloat  ( FILE *fd, const unsigned int n, const          float *var ) ;
00091 void _ssgReadUInt    ( FILE *fd, const unsigned int n,       unsigned int   *var ) ;
00092 void _ssgWriteUInt   ( FILE *fd, const unsigned int n, const unsigned int   *var ) ;
00093 void _ssgReadInt     ( FILE *fd, const unsigned int n,                int   *var ) ;
00094 void _ssgWriteInt    ( FILE *fd, const unsigned int n, const          int   *var ) ;
00095 void _ssgReadUShort  ( FILE *fd, const unsigned int n,       unsigned short *var ) ;
00096 void _ssgWriteUShort ( FILE *fd, const unsigned int n, const unsigned short *var ) ;
00097 void _ssgReadShort   ( FILE *fd, const unsigned int n,                short *var ) ;
00098 void _ssgWriteShort  ( FILE *fd, const unsigned int n, const          short *var ) ;
00099 void _ssgReadBytes   ( FILE *fd, const unsigned int n,                 void *var ) ;
00100 void _ssgWriteBytes  ( FILE *fd, const unsigned int n, const           void *var ) ;
00101 
00102 void _ssgReadString  ( FILE *fd,       char **var ) ;
00103 void _ssgWriteString ( FILE *fd, const char  *var ) ;
00104 
00105 void _ssgReadVec2    ( FILE *fd, sgVec2 var ) ;
00106 void _ssgWriteVec2   ( FILE *fd, const sgVec2 var ) ;
00107 void _ssgReadVec3    ( FILE *fd, sgVec3 var ) ;
00108 void _ssgWriteVec3   ( FILE *fd, const sgVec3 var ) ;
00109 void _ssgReadVec4    ( FILE *fd, sgVec4 var ) ;
00110 void _ssgWriteVec4   ( FILE *fd, const sgVec4 var ) ;
00111 
00112 void _ssgReadMat4    ( FILE *fd, sgMat4 var ) ;
00113 void _ssgWriteMat4   ( FILE *fd, const sgMat4 var ) ;
00114 
00115 int _ssgReadError    ( void ) ;
00116 int _ssgWriteError   ( void ) ;
00117 
00118 float _ssgGetCurrentTweenState () ;
00119 void  _ssgSetCurrentTweenState ( float tweenstate ) ;
00120 
00121 /*
00122   Routines for storing arbitrary ssgBase derived objects within SSG files.
00123   Both functions return 1 on success, and 0 on failure.
00124   If an object is encountered that is not derived from type_mask, then
00125   the loading is aborted and 0 returned.
00126 */
00127 int _ssgSaveObject ( FILE * , ssgBase * ) ;
00128 int _ssgLoadObject ( FILE * , ssgBase ** , int type_mask = 0 ) ;
00129 #endif

Generated on Sat Jul 12 04:29:21 2003 for glPirates by doxygen 1.3.2