[Plib-cvs] plib/src/ssg ssgLoadMDL_BGLTexture.cxx,1.3,1.4 ssgMSFSPalette.h,1.3,1.4
Brought to you by:
sjbaker
From: Sebastian U. <ud...@us...> - 2002-07-01 00:17:02
|
Update of /cvsroot/plib/plib/src/ssg In directory usw-pr-cvs1:/tmp/cvs-serv27931 Modified Files: ssgLoadMDL_BGLTexture.cxx ssgMSFSPalette.h Log Message: Moved definition of fsTexPalette from ssgMSFSPalette.h to ssgLoadMDL_BGLTexture.cxx Index: ssgLoadMDL_BGLTexture.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadMDL_BGLTexture.cxx,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ssgLoadMDL_BGLTexture.cxx 9 Jun 2002 11:29:54 -0000 1.3 +++ ssgLoadMDL_BGLTexture.cxx 1 Jul 2002 00:16:58 -0000 1.4 @@ -45,6 +45,270 @@ #include "ssgLocal.h" #include "ssgMSFSPalette.h" +//=========================================================================== +// Texture palette values (from fs5.pal) +// Alpha channel added for more efficient +// rendering on 3dfx hardware. + +unsigned const char ssgFsTexPalette[1024] = { + 0x00, 0x00, 0x00, 0xff, + 0x08, 0x08, 0x08, 0xff, [...252 lines suppressed...] + 0x21, 0x63, 0x7b, 0xff, + 0x4a, 0x73, 0x84, 0xff +}; + #ifdef SSG_LOAD_MDL_BGL_TEXTURE_SUPPORTED // This really simple (raw paletted) format is used by older MSFS for textures bool ssgLoadMDLTexture ( const char *fname, ssgTextureInfo* info ) @@ -86,9 +350,9 @@ for (int x = 0; x < 256; x++) { unsigned char b; fread(&b, 1, 1, tfile); - texels[c++] = fsTexPalette[b*4 ]; - texels[c++] = fsTexPalette[b*4 + 1]; - texels[c++] = fsTexPalette[b*4 + 2]; + texels[c++] = ssgFsTexPalette[b*4 ]; + texels[c++] = ssgFsTexPalette[b*4 + 1]; + texels[c++] = ssgFsTexPalette[b*4 + 2]; texels[c++] = (b<index)?0:255; } } Index: ssgMSFSPalette.h =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgMSFSPalette.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ssgMSFSPalette.h 7 Nov 2001 23:51:10 -0000 1.3 +++ ssgMSFSPalette.h 1 Jul 2002 00:16:58 -0000 1.4 @@ -24,268 +24,6 @@ #ifndef __SSGMSFSPALETTE #define __SSGMSFSPALETTE -//=========================================================================== -// Texture palette values (from fs5.pal) -// Alpha channel added for more efficient -// rendering on 3dfx hardware. - -static unsigned char fsTexPalette[1024] = { - 0x00, 0x00, 0x00, 0xff, - 0x08, 0x08, 0x08, 0xff, [...238 lines suppressed...] - 0x8c, 0xad, 0x63, 0xff, - 0x84, 0x9c, 0x63, 0xff, - 0x31, 0x42, 0x29, 0xff, - 0x63, 0xa5, 0x5a, 0xff, - 0x4a, 0xd6, 0x4a, 0xff, - 0x39, 0x8c, 0x39, 0xff, - 0x4a, 0xb5, 0x4a, 0xff, - 0x5a, 0xc6, 0x5a, 0xff, - 0x39, 0x7b, 0x39, 0xff, - 0x31, 0x63, 0x31, 0xff, - 0x5a, 0xa5, 0x5a, 0xff, - 0x52, 0x94, 0x52, 0xff, - 0x4a, 0x63, 0x4a, 0xff, - 0x39, 0x73, 0x84, 0xff, - 0x21, 0x63, 0x7b, 0xff, - 0x4a, 0x73, 0x84, 0xff -}; +extern unsigned const char ssgFsTexPalette[] ; #endif // __SSGMSFSPALETTE |