[Plib-cvs] plib/src/fnt fntLocal.h,1.7,1.8 fntTXF.cxx,1.16,1.17
Brought to you by:
sjbaker
From: Sebastian U. <ud...@us...> - 2002-11-09 21:27:26
|
Update of /cvsroot/plib/plib/src/fnt In directory usw-pr-cvs1:/tmp/cvs-serv10999 Modified Files: fntLocal.h fntTXF.cxx Log Message: Removed some global namespace pollution Index: fntLocal.h =================================================================== RCS file: /cvsroot/plib/plib/src/fnt/fntLocal.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- fntLocal.h 2 Sep 2002 06:05:43 -0000 1.7 +++ fntLocal.h 9 Nov 2002 21:27:21 -0000 1.8 @@ -25,13 +25,13 @@ #include "fnt.h" -extern int isSwapped ; -extern FILE *curr_image_fd ; +extern int _fntIsSwapped ; +extern FILE *_fntCurrImageFd ; inline void _fnt_swab_short ( unsigned short *x ) { - if ( isSwapped ) + if ( _fntIsSwapped ) *x = (( *x >> 8 ) & 0x00FF ) | (( *x << 8 ) & 0xFF00 ) ; } @@ -39,7 +39,7 @@ inline void _fnt_swab_int ( unsigned int *x ) { - if ( isSwapped ) + if ( _fntIsSwapped ) *x = (( *x >> 24 ) & 0x000000FF ) | (( *x >> 8 ) & 0x0000FF00 ) | (( *x << 8 ) & 0x00FF0000 ) | @@ -49,7 +49,7 @@ inline void _fnt_swab_int_array ( int *x, int leng ) { - if ( ! isSwapped ) + if ( ! _fntIsSwapped ) return ; for ( int i = 0 ; i < leng ; i++ ) @@ -66,14 +66,14 @@ inline unsigned char _fnt_readByte () { unsigned char x ; - fread ( & x, sizeof(unsigned char), 1, curr_image_fd ) ; + fread ( & x, sizeof(unsigned char), 1, _fntCurrImageFd ) ; return x ; } inline unsigned short _fnt_readShort () { unsigned short x ; - fread ( & x, sizeof(unsigned short), 1, curr_image_fd ) ; + fread ( & x, sizeof(unsigned short), 1, _fntCurrImageFd ) ; _fnt_swab_short ( & x ) ; return x ; } @@ -81,7 +81,7 @@ inline unsigned int _fnt_readInt () { unsigned int x ; - fread ( & x, sizeof(unsigned int), 1, curr_image_fd ) ; + fread ( & x, sizeof(unsigned int), 1, _fntCurrImageFd ) ; _fnt_swab_int ( & x ) ; return x ; } Index: fntTXF.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/fnt/fntTXF.cxx,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- fntTXF.cxx 2 Sep 2002 06:05:43 -0000 1.16 +++ fntTXF.cxx 9 Nov 2002 21:27:21 -0000 1.17 @@ -49,8 +49,8 @@ #endif } -FILE *curr_image_fd ; -int isSwapped = FALSE ; +FILE *_fntCurrImageFd ; +int _fntIsSwapped = FALSE ; static void tex_make_mip_maps ( GLubyte *image, int xsize, int ysize, int zsize ) @@ -187,7 +187,7 @@ return FNT_FALSE ; } - curr_image_fd = fd ; + _fntCurrImageFd = fd ; unsigned char magic [ 4 ] ; @@ -206,10 +206,10 @@ return FNT_FALSE ; } - isSwapped = FALSE ; + _fntIsSwapped = FALSE ; int endianness = _fnt_readInt () ; - isSwapped = ( endianness != 0x12345678 ) ; + _fntIsSwapped = ( endianness != 0x12345678 ) ; int format = _fnt_readInt () ; int tex_width = _fnt_readInt () ; |