From: Rudolf Polzer Date: Sat, 25 Dec 2010 23:18:13 +0000 (+0100) Subject: also -deluxemapsastexcoord X-Git-Tag: xonotic-v0.5.0~92 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5245aefcbe7b70504bd2ae17c55929dba3dfb926;p=xonotic%2Fnetradiant.git also -deluxemapsastexcoord --- diff --git a/tools/quake3/q3map2/convert_ase.c b/tools/quake3/q3map2/convert_ase.c index d0d07719..56262311 100644 --- a/tools/quake3/q3map2/convert_ase.c +++ b/tools/quake3/q3map2/convert_ase.c @@ -165,10 +165,10 @@ static void ConvertSurface( FILE *f, bspModel_t *model, int modelNum, bspDrawSur fprintf( f, "\t*PROP_RECVSHADOW\t1\r\n" ); if(lightmapsAsTexcoord) { - if(ds->lightmapNum[0] >= 0 && ds->lightmapNum[0] < numLightmapsASE) - fprintf( f, "\t*MATERIAL_REF\t%d\r\n", ds->lightmapNum[0] ); + if(ds->lightmapNum[0] >= 0 && ds->lightmapNum[0] + deluxemap < numLightmapsASE) + fprintf( f, "\t*MATERIAL_REF\t%d\r\n", ds->lightmapNum[0] + deluxemap ); else - Sys_Printf( "WARNING: lightmap %d out of range, not exporting\n", ds->lightmapNum[0] ); + Sys_Printf( "WARNING: lightmap %d out of range, not exporting\n", ds->lightmapNum[0] + deluxemap ); } else fprintf( f, "\t*MATERIAL_REF\t%d\r\n", ds->shaderNum ); diff --git a/tools/quake3/q3map2/convert_obj.c b/tools/quake3/q3map2/convert_obj.c index f02da25a..84e5678a 100644 --- a/tools/quake3/q3map2/convert_obj.c +++ b/tools/quake3/q3map2/convert_obj.c @@ -74,18 +74,18 @@ static void ConvertSurfaceToOBJ( FILE *f, bspModel_t *model, int modelNum, bspDr { if(objLastShaderNum != ds->lightmapNum[0]) { - fprintf(f, "usemtl lm_%04d\r\n", ds->lightmapNum[0]); - objLastShaderNum = ds->lightmapNum[0]; + fprintf(f, "usemtl lm_%04d\r\n", ds->lightmapNum[0] + deluxemap); + objLastShaderNum = ds->lightmapNum[0] + deluxemap; } - if(ds->lightmapNum[0] < firstLightmap) + if(ds->lightmapNum[0] + deluxemap < firstLightmap) { - Sys_Printf( "WARNING: lightmap %d out of range (exporting anyway)\n", ds->lightmapNum[0] ); - firstLightmap = ds->lightmapNum[0]; + Sys_Printf( "WARNING: lightmap %d out of range (exporting anyway)\n", ds->lightmapNum[0] + deluxemap ); + firstLightmap = ds->lightmapNum[0] + deluxemap; } if(ds->lightmapNum[0] > lastLightmap) { - Sys_Printf( "WARNING: lightmap %d out of range (exporting anyway)\n", ds->lightmapNum[0] ); - lastLightmap = ds->lightmapNum[0]; + Sys_Printf( "WARNING: lightmap %d out of range (exporting anyway)\n", ds->lightmapNum[0] + deluxemap ); + lastLightmap = ds->lightmapNum[0] + deluxemap; } } else diff --git a/tools/quake3/q3map2/main.c b/tools/quake3/q3map2/main.c index 325235fa..ce631332 100644 --- a/tools/quake3/q3map2/main.c +++ b/tools/quake3/q3map2/main.c @@ -1604,6 +1604,11 @@ int ConvertBSPMain( int argc, char **argv ) shadersAsBitmap = qtrue; else if( !strcmp( argv[ i ], "-lightmapsastexcoord" ) ) lightmapsAsTexcoord = qtrue; + else if( !strcmp( argv[ i ], "-deluxemapsastexcoord" ) ) + { + lightmapsAsTexcoord = qtrue; + deluxemap = qtrue; + } else if( !strcmp( argv[ i ], "-forcereadbsp" ) ) force_bsp = qtrue; else if( !strcmp( argv[ i ], "-meta" ) )