cvar_t mod_q3bsp_optimizedtraceline = {0, "mod_q3bsp_optimizedtraceline", "1", "whether to use optimized traceline code for line traces (as opposed to tracebox code)"};
cvar_t mod_q3bsp_debugtracebrush = {0, "mod_q3bsp_debugtracebrush", "0", "selects different tracebrush bsp recursion algorithms (for debugging purposes only)"};
cvar_t mod_q3bsp_lightmapmergepower = {CVAR_SAVE, "mod_q3bsp_lightmapmergepower", "4", "merges the quake3 128x128 lightmap textures into larger lightmap group textures to speed up rendering, 1 = 256x256, 2 = 512x512, 3 = 1024x1024, 4 = 2048x2048, 5 = 4096x4096, ..."};
+cvar_t mod_q3bsp_nolightmaps = {CVAR_SAVE, "mod_q3bsp_nolightmaps", "0", "do not load lightmaps in Q3BSP maps (to save video RAM, but be warned: it looks ugly)"};
static texture_t mod_q1bsp_texture_solid;
static texture_t mod_q1bsp_texture_sky;
Cvar_RegisterVariable(&mod_q3bsp_optimizedtraceline);
Cvar_RegisterVariable(&mod_q3bsp_debugtracebrush);
Cvar_RegisterVariable(&mod_q3bsp_lightmapmergepower);
+ Cvar_RegisterVariable(&mod_q3bsp_nolightmaps);
memset(&mod_q1bsp_texture_solid, 0, sizeof(mod_q1bsp_texture_solid));
strlcpy(mod_q1bsp_texture_solid.name, "solid" , sizeof(mod_q1bsp_texture_solid.name));
if (cls.state == ca_dedicated)
return;
- if(l->filelen)
+ if(mod_q3bsp_nolightmaps.integer)
+ {
+ return;
+ }
+ else if(l->filelen)
{
// prefer internal LMs for compatibility (a BSP contains no info on whether external LMs exist)
if (developer_loading.integer)
n = -1;
else if (n >= loadmodel->brushq3.num_originallightmaps)
{
- Con_Printf("Mod_Q3BSP_LoadFaces: face #%i (texture \"%s\"): invalid lightmapindex %i (%i lightmaps)\n", i, out->texture->name, n, loadmodel->brushq3.num_originallightmaps);
+ if(loadmodel->brushq3.num_originallightmaps != 0)
+ Con_Printf("Mod_Q3BSP_LoadFaces: face #%i (texture \"%s\"): invalid lightmapindex %i (%i lightmaps)\n", i, out->texture->name, n, loadmodel->brushq3.num_originallightmaps);
n = -1;
}
else
static void (*ModPlug_Seek) (ModPlugFile* file, int millisecond);
static void (*ModPlug_GetSettings) (ModPlug_Settings* settings);
static void (*ModPlug_SetSettings) (const ModPlug_Settings* settings);
+static void (*ModPlug_SetMasterVolume) (ModPlugFile* file,unsigned int cvol) ;
+
static dllfunction_t modplugfuncs[] =
{
// Load the DLLs
// We need to load both by hand because some OSes seem to not load
// the modplug DLL automatically when loading the modplugFile DLL
- return Sys_LoadLibrary (dllnames_modplug, &modplug_dll, modplugfuncs);
+ if(Sys_LoadLibrary (dllnames_modplug, &modplug_dll, modplugfuncs))
+ {
+ ModPlug_SetMasterVolume = Sys_GetProcAddress(modplug_dll, "ModPlug_SetMasterVolume");
+ if(!ModPlug_SetMasterVolume)
+ Con_Print("Warning: modplug volume control not supported. Try getting a newer version of libmodplug.\n");
+ return true;
+ }
+ else
+ return false;
}
Mem_Free (per_ch);
return NULL;
}
+
+ if(ModPlug_SetMasterVolume)
+ ModPlug_SetMasterVolume(per_ch->mf, 512); // max volume, DP scales down!
+
per_ch->bs = 0;
per_ch->sb_offset = 0;
return false;
}
+ if(ModPlug_SetMasterVolume)
+ ModPlug_SetMasterVolume(mf, 512); // max volume, DP scales down!
+
if (developer_loading.integer >= 2)
Con_Printf ("\"%s\" will be streamed\n", filename);
per_sfx = (modplug_stream_persfx_t *)Mem_Alloc (snd_mempool, sizeof (*per_sfx));