it seems somebody forgot to commit this. just compied direct from qw
libs/video/targets/.gitignore:
	better ignore rules
nq/source/Makefile.am:
	libqfsys.a is dead :)
the rest:
	gamma compile fixes
This commit is contained in:
Bill Currie 2001-04-11 16:19:08 +00:00
parent f789b61c56
commit ebb7b6310a
6 changed files with 106 additions and 2 deletions

59
include/view.h Normal file
View File

@ -0,0 +1,59 @@
/*
view.h
(description)
Copyright (C) 1996-1997 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
// view.h
#ifndef __view_h_
#define __view_h_
#include "QF/mathlib.h"
#include "QF/cvar.h"
extern cvar_t *brightness;
extern cvar_t *contrast;
#define INFO_CSHIFT_BONUS (1 << 0)
#define INFO_CSHIFT_CONTENTS (1 << 1)
#define INFO_CSHIFT_DAMAGE (1 << 2)
#define INFO_CSHIFT_POWERUP (1 << 3)
void V_Init (void);
void V_Init_Cvars (void);
void V_RenderView (void);
float V_CalcRoll (vec3_t angles, vec3_t velocity);
void V_UpdatePalette (void);
void V_StartPitchDrift (void);
void V_StopPitchDrift (void);
void V_RenderView (void);
void V_UpdatePalette (void);
void V_Register (void);
void V_ParseDamage (void);
void V_SetContentsColor (int contents);
void V_CalcBlend (void);
#endif // __view_h_

View File

@ -1,3 +1,7 @@
*.la
*.lo
.deps
.libs
.vimrc
Makefile.in
Makefile
Makefile.in

View File

@ -38,7 +38,7 @@ bin_PROGRAMS = @NQ_TARGETS@
EXTRA_PROGRAMS= nq-3dfx nq-fbdev nq-glx nq-mgl nq-sdl \
nq-sgl nq-svga nq-wgl nq-x11 nq-server
noinst_LIBRARIES= libqfsys.a libqfnet.a
noinst_LIBRARIES= libqfnet.a
#if ASM_ARCH
math_ASM= cl_math.S

View File

@ -58,6 +58,8 @@ HWND mainwindow;
// static float oldin_grab = 0;
cvar_t *vid_fullscreen;
cvar_t *vid_system_gamma;
qboolean vid_gamma_avail;
extern viddef_t vid; // global video state
unsigned short d_8to16table[256];
@ -197,6 +199,8 @@ VID_Init_Cvars ()
vid_fullscreen =
Cvar_Get ("vid_fullscreen", "0", CVAR_ROM, NULL,
"Toggles fullscreen game mode");
vid_system_gamma = Cvar_Get ("vid_system_gamma", "1", CVAR_ARCHIVE, NULL,
"Use system gamma control if available");
}
void
@ -289,3 +293,9 @@ VID_SetCaption (char *text)
SDL_WM_SetCaption (va ("%s %s", PROGRAM, VERSION), NULL);
}
}
qboolean
VID_SetGamma (double gamma)
{
return false; //FIXME
}

View File

@ -64,6 +64,8 @@ HWND mainwindow;
static qboolean vid_initialized = false;
cvar_t *vid_fullscreen;
cvar_t *vid_system_gamma;
qboolean vid_gamma_avail;
int VID_options_items = 1;
int modestate;
@ -230,6 +232,8 @@ VID_Init_Cvars ()
{
vid_fullscreen = Cvar_Get ("vid_fullscreen", "0", CVAR_ROM, NULL,
"Toggles fullscreen mode");
vid_system_gamma = Cvar_Get ("vid_system_gamma", "1", CVAR_ARCHIVE, NULL,
"Use system gamma control if available");
}
void
@ -244,3 +248,20 @@ VID_SetCaption (char *text)
SDL_WM_SetCaption (va ("%s %s", PROGRAM, VERSION), NULL);
}
}
qboolean
VID_SetGamma (double gamma)
{
return false; //FIXME
}
void
VID_UpdateGamma (cvar_t *vid_gamma)
{
if (vid_gamma->flags & CVAR_ROM) // System gamma unavailable
return;
Cvar_SetValue (vid_gamma, bound (0.1, vid_gamma->value, 9.9));
VID_SetGamma (vid_gamma->value);
}

View File

@ -58,6 +58,8 @@
void VGA_UpdatePlanarScreen (void *srcbuffer);
cvar_t *vid_system_gamma;
qboolean vid_gamma_avail;
unsigned short d_8to16table[256];
@ -615,6 +617,8 @@ VID_Init_Cvars ()
"Redraw entire screen each frame instead of just dirty areas");
vid_waitforrefresh = Cvar_Get ("vid_waitforrefresh", "0", CVAR_ARCHIVE,
NULL, "Wait for vertical retrace before drawing next frame");
vid_system_gamma = Cvar_Get ("vid_system_gamma", "1", CVAR_ARCHIVE, NULL,
"Use system gamma control if available");
}
@ -761,3 +765,9 @@ void
VID_SetCaption (char *text)
{
}
qboolean
VID_SetGamma (double gamma)
{
return false; //FIXME
}