void M_Background(int width, int height)
{
- menu_width = width;
- menu_height = height;
+ menu_width = bound(1, width, vid.conwidth);
+ menu_height = bound(1, height, vid.conheight);
menu_x = (vid.conwidth - menu_width) * 0.5;
menu_y = (vid.conheight - menu_height) * 0.5;
//DrawQ_Fill(menu_x, menu_y, menu_width, menu_height, 0, 0, 0, 0.5, 0);
int visible;
cachepic_t *p;
- M_Background(320, 240);
+ M_Background(320, bound(200, 32 + OPTIONS_ITEMS * 8, vid.conheight));
M_DrawPic(16, 4, "gfx/qplaque.lmp");
p = Draw_CachePic("gfx/p_option.lmp");
optnum = 0;
optcursor = options_cursor;
- visible = (vid.conheight - 32) / 8;
+ visible = (menu_height - 32) / 8;
opty = 32 - bound(0, optcursor - (visible >> 1), max(0, OPTIONS_ITEMS - visible)) * 8;
M_Options_PrintCommand( "Customize controls", true);
extern cvar_t r_detailtextures;
extern cvar_t cl_stainmaps;
-extern cvar_t cl_stainmapsclearonload;
+extern cvar_t cl_stainmaps_clearonload;
extern cvar_t r_explosionclip;
extern cvar_t r_modellights;
extern cvar_t r_coronas;
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&cl_particles_explosions_shell, !cl_particles_explosions_shell.integer);
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_explosionclip, !r_explosionclip.integer);
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&cl_stainmaps, !cl_stainmaps.integer);
- else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&cl_stainmapsclearonload, !cl_stainmapsclearonload.integer);
+ else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&cl_stainmaps_clearonload, !cl_stainmaps_clearonload.integer);
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&cl_decals, !cl_decals.integer);
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_detailtextures, !r_detailtextures.integer);
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&cl_particles_bulletimpacts, !cl_particles_bulletimpacts.integer);
int visible;
cachepic_t *p;
- M_Background(320, 200);
+ M_Background(320, bound(200, 32 + OPTIONS_EFFECTS_ITEMS * 8, vid.conheight));
M_DrawPic(16, 4, "gfx/qplaque.lmp");
p = Draw_CachePic("gfx/p_option.lmp");
optcursor = options_effects_cursor;
optnum = 0;
- visible = (vid.conheight - 32) / 8;
+ visible = (menu_height - 32) / 8;
opty = 32 - bound(0, optcursor - (visible >> 1), max(0, OPTIONS_EFFECTS_ITEMS - visible)) * 8;
M_Options_PrintSlider( " Lights Per Model", true, r_modellights.value, 0, 8);
M_Options_PrintCheckbox(" Explosion Shell", true, cl_particles_explosions_shell.integer);
M_Options_PrintCheckbox(" Explosion Shell Clip", true, r_explosionclip.integer);
M_Options_PrintCheckbox(" Stainmaps", true, cl_stainmaps.integer);
- M_Options_PrintCheckbox("Onload Clear Stainmaps", true, cl_stainmapsclearonload.integer);
+ M_Options_PrintCheckbox("Onload Clear Stainmaps", true, cl_stainmaps_clearonload.integer);
M_Options_PrintCheckbox(" Decals", true, cl_decals.integer);
M_Options_PrintCheckbox(" Detail Texturing", true, r_detailtextures.integer);
M_Options_PrintCheckbox(" Bullet Impacts", true, cl_particles_bulletimpacts.integer);
}
-#define OPTIONS_GRAPHICS_ITEMS 7
+#define OPTIONS_GRAPHICS_ITEMS 12
int options_graphics_cursor;
extern cvar_t r_shadow_realtime_world_dlightshadows;
extern cvar_t r_shadow_realtime_world_lightmaps;
extern cvar_t r_shadow_realtime_world_shadows;
+extern cvar_t r_bloom;
+extern cvar_t r_bloom_intensity;
+extern cvar_t r_bloom_power;
+extern cvar_t r_bloom_blur;
+extern cvar_t r_bloom_resolution;
void M_Menu_Options_Graphics_AdjustSliders (int dir)
{
else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_shadow_realtime_world_dlightshadows, !r_shadow_realtime_world_dlightshadows.integer);
else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_shadow_realtime_world_lightmaps, bound(0, r_shadow_realtime_world_lightmaps.value + dir * 0.1, 1));
else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_shadow_realtime_world_shadows, !r_shadow_realtime_world_shadows.integer);
+ else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom, !r_bloom.integer);
+ else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom_intensity, bound(1, r_bloom_intensity.value + dir * 1, 16));
+ else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom_power, bound(1, r_bloom_power.value + dir * 1, 16));
+ else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom_blur, bound(1, r_bloom_blur.value + dir * 1, 16));
+ else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom_resolution, bound(64, r_bloom_resolution.value + dir * 64, 2048));
}
int visible;
cachepic_t *p;
- M_Background(320, 200);
+ M_Background(320, bound(200, 32 + OPTIONS_GRAPHICS_ITEMS * 8, vid.conheight));
M_DrawPic(16, 4, "gfx/qplaque.lmp");
p = Draw_CachePic("gfx/p_option.lmp");
optcursor = options_graphics_cursor;
optnum = 0;
- visible = (vid.conheight - 32) / 8;
+ visible = (menu_height - 32) / 8;
opty = 32 - bound(0, optcursor - (visible >> 1), max(0, OPTIONS_GRAPHICS_ITEMS - visible)) * 8;
M_Options_PrintSlider( " Gloss Mode", true, r_shadow_gloss.integer, 0, 2);
M_Options_PrintCheckbox("RT World DLight Shadows", true, r_shadow_realtime_world_dlightshadows.integer);
M_Options_PrintSlider( " RT World Lightmaps", true, r_shadow_realtime_world_lightmaps.value, 0, 1);
M_Options_PrintCheckbox(" RT World Shadow", true, r_shadow_realtime_world_shadows.integer);
+ M_Options_PrintCheckbox(" Bloom Effect", true, r_bloom.integer);
+ M_Options_PrintSlider( " Bloom Intensity", true, r_bloom_intensity.value, 1, 16);
+ M_Options_PrintSlider( " Bloom Power", true, r_bloom_power.value, 1, 16);
+ M_Options_PrintSlider( " Bloom Blur", true, r_bloom_blur.value, 1, 16);
+ M_Options_PrintSlider( " Bloom Resolution", true, r_bloom_resolution.value, 64, 2048);
}
optcursor = options_colorcontrol_cursor;
optnum = 0;
- visible = (vid.conheight - 32) / 8;
+ visible = (menu_height - 32) / 8;
opty = 32 - bound(0, optcursor - (visible >> 1), max(0, OPTIONS_COLORCONTROL_ITEMS - visible)) * 8;
M_Options_PrintCommand( " Reset to defaults", true);
{"cpbb04", "Deadly Inspirations"},
{"b2a15", "Area 15 (B2)"},
+ {"b2power", "BB_Power"},
{"barena", "Blood Arena"},
{"bkeep", "Blood Keep"},
{"bstar", "Brown Star"},
{"Post Mortem", 45, 9},
{"Cryptic Passage", 54, 10},
{"Cryptic BloodBath", 64, 4},
- {"Blood 2", 68, 5},
- {"Transfusion", 73, 9},
- {"Conversions", 82, 6}
+ {"Blood 2", 68, 6},
+ {"Transfusion", 74, 9},
+ {"Conversions", 83, 6}
};
level_t goodvsbad2levels[] =
s = va("%i/%i masters %i/%i servers", masterreplycount, masterquerycount, serverreplycount, serverquerycount);
M_PrintRed((640 - strlen(s) * 8) / 2, 32, s);
if (*m_return_reason)
- M_Print(16, vid.conheight - 8, m_return_reason);
+ M_Print(16, menu_height - 8, m_return_reason);
y = 48;
- visible = (vid.conheight - 16 - y) / 8;
- start = bound(0, slist_cursor - (visible >> 1), hostCacheCount - visible);
- end = min(start + visible, hostCacheCount);
+ visible = (menu_height - 16 - y) / 8;
+ start = bound(0, slist_cursor - (visible >> 1), hostcache_viewcount - visible);
+ end = min(start + visible, hostcache_viewcount);
p = Draw_CachePic("gfx/p_multi.lmp");
M_DrawPic((640 - p->width) / 2, 4, "gfx/p_multi.lmp");
for (n = start;n < end;n++)
{
DrawQ_Fill(menu_x, menu_y + y, 640, 16, n == slist_cursor ? (0.5 + 0.2 * sin(realtime * M_PI)) : 0, 0, 0, 0.5, 0);
- M_Print(0, y, hostcache[n].line1);y += 8;
- M_Print(0, y, hostcache[n].line2);y += 8;
+ M_Print(0, y, hostcache_viewset[n]->line1);y += 8;
+ M_Print(0, y, hostcache_viewset[n]->line2);y += 8;
}
}
else if (realtime - masterquerytime < 3)
S_LocalSound ("sound/misc/menu1.wav");
slist_cursor--;
if (slist_cursor < 0)
- slist_cursor = hostCacheCount - 1;
+ slist_cursor = hostcache_viewcount - 1;
break;
case K_DOWNARROW:
case K_RIGHTARROW:
S_LocalSound ("sound/misc/menu1.wav");
slist_cursor++;
- if (slist_cursor >= hostCacheCount)
+ if (slist_cursor >= hostcache_viewcount)
slist_cursor = 0;
break;
case K_ENTER:
S_LocalSound ("sound/misc/menu2.wav");
- Cbuf_AddText(va("connect \"%s\"\n", hostcache[slist_cursor].cname));
+ Cbuf_AddText(va("connect \"%s\"\n", hostcache_viewset[slist_cursor]->info.cname));
break;
default: