gl_rmain.c: Fix up brighten cvar/arg properly so it can be setrom'ed

vid.c: Get rid of the redundancy, much nicer.
quakeforge.lsm.in: Update Linux Software Map data file.
This commit is contained in:
Jeff Teunissen 2000-11-04 08:20:20 +00:00
parent ba11d00aba
commit 59b79d250a
3 changed files with 38 additions and 24 deletions

View file

@ -1,5 +1,5 @@
Begin3
Title: quakeforge
Title: @PROGRAM@
Version: @VERSION@
Entered-date: @ISODATE@
Description: 3D game engine based on id Software's Quake engine
@ -7,9 +7,11 @@ Keywords: 3D, game, engine, quake
Author: quake-devel@lists.sourceforge.net (The QuakeForge Project)
Maintained-by: quake-devel@lists.sourceforge.net (The QuakeForge Project)
Primary-site: http://www.quakeforge.net/
31k quakeforge-@VERSION@.tar.gz
550 quakeforge.lsm
Alternate-site: http://sourceforge.net/project/?group_id=882
604k @PACKAGE@-@VERSION@.tar.bz2
730k @PACKAGE@-@VERSION@.tar.gz
1007k @PACKAGE@-@VERSION@.zip
550 @PACKAGE@.lsm
Alternate-site: http://sourceforge.net/projects/quake/
Original-site: http://www.quakeforge.net/
Platforms: any
Copying-policy: GPL v2

View file

@ -148,15 +148,18 @@ GL_CheckBrightness (unsigned char *pal)
int i, inf;
float brightness;
brighten = Cvar_Get ("brighten", "1", CVAR_ROM,
brighten = Cvar_Get ("brighten", "1", CVAR_NONE,
"Palette hack equivalent to brightness");
if ((i = COM_CheckParm ("-brighten"))) {
brightness = atof (com_argv[i + 1]);
} else {
brightness = brighten->value;
}
brightness = bound (1, brightness, 5);
Cvar_SetROM (brighten, va("%f", brightness));
Cvar_SetValue (brighten, brightness);
Cvar_SetFlags (brighten, brighten->flags | CVAR_ROM);
// Build gamma table
if (brightness == 1.0) { // screw the math

View file

@ -47,33 +47,42 @@ VID_GetWindowSize (int def_w, int def_h)
{
int pnum;
if ((pnum=COM_CheckParm("-winsize"))) {
if (pnum >= com_argc-2)
Sys_Error("VID: -winsize <width> <height>\n");
vid_width = Cvar_Get ("vid_width", com_argv[pnum+1], CVAR_ROM, "screen width");
vid_height = Cvar_Get ("vid_height", com_argv[pnum+2], CVAR_ROM, "screen height");
if (!vid_width->int_val || !vid_height->int_val)
Sys_Error("VID: Bad window width/height\n");
}
vid_width = Cvar_Get ("vid_width", va ("%d", def_w), CVAR_NONE, "screen width");
vid_height = Cvar_Get ("vid_height", va ("%d", def_h), CVAR_NONE, "screen height");
if ((pnum=COM_CheckParm("-width"))) {
if ((pnum = COM_CheckParm ("-width"))) {
if (pnum >= com_argc-1)
Sys_Error("VID: -width <width>\n");
vid_width = Cvar_Get ("vid_width", com_argv[pnum+1], CVAR_ROM, "screen width");
Sys_Error ("VID: -width <width>\n");
Cvar_Set (vid_width, com_argv[pnum+1]);
if (!vid_width->int_val)
Sys_Error("VID: Bad window width\n");
Sys_Error ("VID: Bad window width\n");
}
if ((pnum=COM_CheckParm("-height"))) {
if ((pnum = COM_CheckParm ("-height"))) {
if (pnum >= com_argc-1)
Sys_Error("VID: -height <height>\n");
vid_height = Cvar_Get ("vid_height", com_argv[pnum+1], CVAR_ROM, "screen height");
Sys_Error ("VID: -height <height>\n");
Cvar_Set (vid_height, com_argv[pnum+1]);
if (!vid_height->int_val)
Sys_Error("VID: Bad window height\n");
Sys_Error ("VID: Bad window height\n");
}
vid_width = Cvar_Get ("vid_width", va("%d",def_w), CVAR_ROM, "screen width");
vid_height = Cvar_Get ("vid_height", va("%d",def_h), CVAR_ROM, "screen height");
if ((pnum = COM_CheckParm ("-winsize"))) {
if (pnum >= com_argc-2)
Sys_Error ("VID: -winsize <width> <height>\n");
Cvar_Set (vid_width, com_argv[pnum+1]);
Cvar_Set (vid_height, com_argv[pnum+2]);
if (!vid_width->int_val || !vid_height->int_val)
Sys_Error ("VID: Bad window width/height\n");
}
Cvar_SetFlags (vid_width, vid_width->flags | CVAR_ROM);
Cvar_SetFlags (vid_height, vid_height->flags | CVAR_ROM);
scr_width = vid.width = vid_width->int_val;
scr_height = vid.height = vid_height->int_val;