[Plib-devel] ssg Borland
Brought to you by:
sjbaker
From: Simon <sim...@ho...> - 2004-05-03 17:20:02
|
Hi, ok well here are the changes I had to make to get ssg to build with Borland C++ Builder 6 on Windows XP: =20 Ul.h After the system if defs I added: =20 #if defined(BORLANDBUILDER) #define UL_BB 1 #endif =20 ssgVtxTable.cxx Within void ssgVtxTable::transform ( const sgMat4 m ) there is a line = that says: =20 m =3D w; =20 I had to comment it out - the error message is that you cannot modify a const object, I think this is a bad solution on my part. Definitely a = quick fix. =20 ssgLoaderWriterStuff.h Within ssgListOfLists : public ssgSimpleList =20 #ifdef UL_BB ssgListOfLists ( int init =3D 3 ) : ssgSimpleList ( = sizeof(ssgSimpleList*), init ) {} #else ssgListOfLists ( int init =3D 3 ) : ssgSimpleList ( sizeof(class ssgSimpleList*), init ) {} #endif =20 Also within ssgSimpleStateList : public ssgSimpleList =20 #ifdef UL_BB ssgSimpleStateList( int init =3D 3 ) : ssgSimpleList ( sizeof(ssgSimpleState*), init ) {} #else ssgSimpleStateList( int init =3D 3 ) : ssgSimpleList ( sizeof(class ssgSimpleState*), init ) {} #endif =20 Also within ssgListOfNodes : public ssgSimpleList =20 #ifdef UL_BB ssgListOfNodes ( int init =3D 3 ) : ssgSimpleList ( sizeof(ssgBase*), = init ) {} #else ssgListOfNodes ( int init =3D 3 ) : ssgSimpleList ( sizeof(class = ssgBase*), init ) {} #endif =20 ssgParser.cxx Inside static char *mystrchr( const char *string, int c ) =20 #ifdef UL_BB return strchr( (char*)string, c ); #else return strchr( string, c ); #endif =20 ssgSaveAC.cxx Inside static int ssgSaveLeaf ( ssgEntity *ent ) =20 if ( writeTextureWithoutPath ) { #ifdef UL_BB char *s =3D strrchr ( (char*)tfname, '\\' ) ; #else char *s =3D strrchr ( tfname, '\\' ) ; #endif =20 if ( s =3D=3D NULL ) #ifdef UL_BB s =3D strrchr ( (char*)tfname, '/' ) ; #else s =3D strrchr ( tfname, '/' ) ; #endif . =20 ssgLoadMDL_BGLTexture.cxx Inside: bool ssgLoadMDLTexture ( const char *fname, ssgTextureInfo* info = ) at the top of the first if statement: =20 #ifdef UL_BB char *p =3D strrchr((char*)fname,'_'); #else char *p =3D strrchr(fname,'_'); #endif =20 That's it for now. I'll post any other fixes I have to do as I make = them. Hope someone can recommend something for the first one (m=3Dw). I made = the changes to non beautified versions of the source files so I posted those = as well. I think I got all the file names right, I was really speeding = through as I want to get back to work soon. =20 Edit-> The mail I sent with the zip file got bounced back. The zip is available below for the next week or so: =20 http://www.millington.no-ip.org/trials/plibfixes.zip =20 |