mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-03-13 03:33:28 +00:00
white space
This commit is contained in:
parent
e678502641
commit
0630268292
2 changed files with 20 additions and 20 deletions
15
source/vid.c
15
source/vid.c
|
@ -3,11 +3,7 @@
|
|||
|
||||
general video driver functions
|
||||
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
Copyright (C) 1999-2000 contributors of the QuakeForge project
|
||||
Copyright (C) 2000 Marcus Sundberg [mackan@stacken.kth.se]
|
||||
Copyright (C) 1999,2000 contributors of the QuakeForge project
|
||||
Please see the file "AUTHORS" for a list of contributors
|
||||
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
|
||||
|
@ -29,9 +25,9 @@
|
|||
|
||||
$Id$
|
||||
*/
|
||||
#define _BSD
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include "cvar.h"
|
||||
|
@ -40,13 +36,14 @@
|
|||
#include "qargs.h"
|
||||
#include "sys.h"
|
||||
|
||||
extern viddef_t vid; // global video state
|
||||
extern viddef_t vid; // global video state
|
||||
|
||||
int scr_width, scr_height;
|
||||
cvar_t *vid_width;
|
||||
cvar_t *vid_height;
|
||||
|
||||
void VID_GetWindowSize (int def_w, int def_h)
|
||||
void
|
||||
VID_GetWindowSize (int def_w, int def_h)
|
||||
{
|
||||
int pnum;
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#endif
|
||||
|
||||
#include <GL/gl.h>
|
||||
|
||||
#ifdef HAVE_GL_GLEXT_H
|
||||
#include <GL/glext.h>
|
||||
#endif
|
||||
|
@ -59,7 +60,7 @@
|
|||
#define WARP_HEIGHT 200
|
||||
|
||||
#ifdef HAVE_DLOPEN
|
||||
static void *dlhand = NULL;
|
||||
static void *dlhand = NULL;
|
||||
#endif
|
||||
|
||||
//unsigned short d_8to16table[256];
|
||||
|
@ -70,9 +71,9 @@ cvar_t *vid_mode;
|
|||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
|
||||
int texture_mode = GL_LINEAR;
|
||||
int texture_mode = GL_LINEAR;
|
||||
int texture_extension_number = 1;
|
||||
float gldepthmin, gldepthmax;
|
||||
float gldepthmin, gldepthmax;
|
||||
|
||||
const char *gl_vendor;
|
||||
const char *gl_renderer;
|
||||
|
@ -96,7 +97,7 @@ cvar_t *vid_use8bit;
|
|||
*/
|
||||
|
||||
void
|
||||
CheckMultiTextureExtensions ( void )
|
||||
CheckMultiTextureExtensions (void)
|
||||
{
|
||||
Con_Printf ("Checking for multitexture... ");
|
||||
if (COM_CheckParm ("-nomtex")) {
|
||||
|
@ -162,7 +163,7 @@ VID_SetPalette (unsigned char *palette)
|
|||
|
||||
pal = palette;
|
||||
table = d_8to24table;
|
||||
for (i=0 ; i<255 ; i++) { // used to be i<256, see d_8to24table below
|
||||
for (i = 0; i < 255; i++) { // used to be i<256, see d_8to24table below
|
||||
r = pal[0];
|
||||
g = pal[1];
|
||||
b = pal[2];
|
||||
|
@ -186,18 +187,20 @@ VID_SetPalette (unsigned char *palette)
|
|||
Qread(f, d_15to8table, 1<<15);
|
||||
Qclose(f);
|
||||
} else {
|
||||
for (i=0; i < (1<<15); i++) {
|
||||
for (i = 0; i < (1<<15); i++) {
|
||||
/* Maps
|
||||
000000000000000
|
||||
000000000011111 = Red = 0x1F
|
||||
000001111100000 = Blue = 0x03E0
|
||||
111110000000000 = Grn = 0x7C00
|
||||
*/
|
||||
r = ((i & 0x1F) << 3)+4;
|
||||
g = ((i & 0x03E0) >> 2)+4;
|
||||
b = ((i & 0x7C00) >> 7)+4;
|
||||
pal = (unsigned char *)d_8to24table;
|
||||
for (v=0,k=0,bestdist=10000.0; v<256; v++,pal+=4) {
|
||||
r = ((i & 0x1F) << 3) + 4;
|
||||
g = ((i & 0x03E0) >> 2) + 4;
|
||||
b = ((i & 0x7C00) >> 7) + 4;
|
||||
|
||||
pal = (unsigned char *) d_8to24table;
|
||||
|
||||
for (v=0, k=0, bestdist = 10000.0; v<256; v++,pal+=4) {
|
||||
r1 = (int)r - (int)pal[0];
|
||||
g1 = (int)g - (int)pal[1];
|
||||
b1 = (int)b - (int)pal[2];
|
||||
|
|
Loading…
Reference in a new issue