void SwapBSPFile( void ){
int i, j;
-
+ shaderInfo_t *si;
/* models */
SwapBlock( (int*) bspModels, numBSPModels * sizeof( bspModels[ 0 ] ) );
/* shaders (don't swap the name) */
for ( i = 0; i < numBSPShaders ; i++ )
{
+ si = ShaderInfoForShader( bspShaders[ i ].shader );
+ if ( si->remapShader && si->remapShader[ 0 ] ) {
+ strcpy( bspShaders[ i ].shader, si->remapShader );
+ }
+
bspShaders[ i ].contentFlags = LittleLong( bspShaders[ i ].contentFlags );
bspShaders[ i ].surfaceFlags = LittleLong( bspShaders[ i ].surfaceFlags );
}
/* check for odd size */
if ( header->lumps[ lump ].length % size ) {
if ( force ) {
- Sys_Printf( "WARNING: GetLumpElements: odd lump size (%d) in lump %d\n", header->lumps[ lump ].length, lump );
+ Sys_FPrintf( SYS_WRN, "WARNING: GetLumpElements: odd lump size (%d) in lump %d\n", header->lumps[ lump ].length, lump );
return 0;
}
else{
}
if ( length % size ) {
if ( force ) {
- Sys_Printf( "WARNING: CopyLump: odd lump size (%d) in lump %d\n", length, lump );
+ Sys_FPrintf( SYS_WRN, "WARNING: CopyLump: odd lump size (%d) in lump %d\n", length, lump );
return 0;
}
else{
numBSPEntities = numEntities;
}
+
+
/*
* must be called before UnparseEntities
*/
char *sentinel = newCommandLine + sizeof( newCommandLine ) - 1;
int i;
+if (nocmdline)
+{
+ return;
+}
previousCommandLine = ValueForKey( &entities[0], "_q3map2_cmdline" );
if ( previousCommandLine && *previousCommandLine ) {
inpos = previousCommandLine;
SetKeyValue( &entities[0], "_q3map2_version", Q3MAP_VERSION );
}
+
+
/*
UnparseEntities()
generates the dentdata string from all the entities.
ep->value = copystring( value );
}
+
+
/*
KeyExists()
returns true if entity has this key
return qfalse;
}
+
+
/*
ValueForKey()
gets the value for an entity key