Make ifdef's more consistent (and follow CodingStyle), HAVE_* cleanups, make -ggi target compile again, little whitespace, and sorted includes.

This commit is contained in:
Ragnvald Maartmann-Moe IV 2000-12-30 18:26:29 +00:00
parent 1ad52d2e98
commit 986a610860
8 changed files with 82 additions and 81 deletions

View file

@ -32,13 +32,13 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#ifdef HAVE_STRING_H
#include <string.h>
# include <string.h>
#endif
#ifdef HAVE_STRINGS_H
#include <strings.h>
# include <strings.h>
#endif
#include <GL/gl.h>
#include <GL/fxmesa.h>
#include <glide/sst1vid.h>

View file

@ -30,8 +30,12 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <string.h>
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#ifdef _WIN32
// must be BEFORE include gl/gl.h
@ -59,7 +63,7 @@ cvar_t *vid_mode;
/*-----------------------------------------------------------------------*/
int texture_mode = GL_LINEAR;
int texture_mode = GL_LINEAR_MIPMAP_LINEAR; // DESPAIR: was GL_LINEAR
int texture_extension_number = 1;
float gldepthmin, gldepthmax;
@ -228,8 +232,10 @@ GL_Init_Common (void)
glShadeModel (GL_FLAT);
glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
// glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
// glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); // DESPAIR: was GL_LINEAR
glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);

View file

@ -29,53 +29,47 @@
#define _BSD
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#include <ggi/ggi.h>
#include "bothdefs.h" // needed by: common.h, net.h,
// client.h
#include "bspfile.h" // needed by: glquake.h
#include "vid.h"
#include "sys.h"
#include "mathlib.h" // needed by: protocol.h, render.h,
// client.h,
// modelgen.h, glmodel.h
#include "wad.h"
#include "draw.h"
#include "bothdefs.h" // needed by: common.h, net.h, client.h
#include "cl_input.h"
#include "client.h" // need cls in this file
#include "cmd.h"
#include "compat.h"
#include "console.h"
#include "cvar.h"
#include "d_local.h"
#include "draw.h"
#include "host.h"
#include "input.h"
#include "joystick.h"
#include "keys.h"
#include "mathlib.h" // needed by: protocol.h, render.h, client.h, modelgen.h, glmodel.h
#include "model.h" // needed by: glquake.h
#include "net.h" // needed by: client.h
#include "protocol.h" // needed by: client.h
#include "cmd.h"
#include "host.h"
#include "keys.h"
#include "qargs.h"
#include "qendian.h"
#include "render.h" // needed by: client.h, gl_model.h, glquake.h
#include "sbar.h"
#include "sound.h"
#include "render.h" // needed by: client.h, gl_model.h,
// glquake.h
#include "client.h" // need cls in this file
#include "model.h" // needed by: glquake.h
#include "console.h"
#include "qendian.h"
#include "qargs.h"
#include "compat.h"
#include "d_local.h"
#include "input.h"
#include "cl_input.h"
#include "sys.h"
#include "vid.h"
#include "view.h"
#include "joystick.h"
#include "wad.h"
extern viddef_t vid; // global video state
unsigned short d_8to16table[256];

View file

@ -30,12 +30,11 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#ifdef HAVE_STRING_H
#include <string.h>
# include <string.h>
#endif
#ifdef HAVE_STRINGS_H
#include <strings.h>
# include <strings.h>
#endif
#include <GL/glx.h>

View file

@ -29,13 +29,13 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#ifdef HAVE_STRING_H
#include <string.h>
# include <string.h>
#endif
#ifdef HAVE_STRINGS_H
#include <strings.h>
# include <strings.h>
#endif
#include <SDL.h>
#include "cvar.h"
@ -46,6 +46,13 @@
#include "va.h"
#include "vid.h"
#ifdef WIN32
/* fixme: this is evil hack to get full DirectSound support with SDL */
#include <windows.h>
#include <SDL_syswm.h>
HWND mainwindow;
#endif
// static float oldin_grab = 0;
cvar_t *vid_fullscreen;
@ -55,13 +62,6 @@ unsigned short d_8to16table[256];
int modestate; // fixme: just to avoid cross-comp.
// errors - remove later
#ifdef WIN32
/* fixme: this is evil hack to get full DirectSound support with SDL */
#include <windows.h>
#include <SDL_syswm.h>
HWND mainwindow;
#endif
// The original defaults
#define BASEWIDTH 320
#define BASEHEIGHT 200

View file

@ -30,14 +30,15 @@
# include "config.h"
#endif
#ifdef HAVE_STRING_H
#include <string.h>
# include <string.h>
#endif
#ifdef HAVE_STRINGS_H
#include <strings.h>
# include <strings.h>
#endif
#ifndef WIN32
#include <sys/signal.h>
# include <sys/signal.h>
#endif
#include <SDL.h>
#include "console.h"
@ -48,13 +49,6 @@
#include "sys.h"
#include "va.h"
#define WARP_WIDTH 320
#define WARP_HEIGHT 200
static qboolean vid_initialized = false;
cvar_t *vid_fullscreen;
#ifdef WIN32
/* fixme: this is evil hack to get full DirectSound support with SDL */
#include <windows.h>
@ -62,6 +56,13 @@ cvar_t *vid_fullscreen;
HWND mainwindow;
#endif
#define WARP_WIDTH 320
#define WARP_HEIGHT 200
static qboolean vid_initialized = false;
cvar_t *vid_fullscreen;
int VID_options_items = 1;
int modestate;

View file

@ -34,10 +34,8 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <stdio.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
# include <unistd.h>
#endif
#if defined(HAVE_SYS_IO_H)
# include <sys/io.h>
@ -45,17 +43,18 @@
# include <asm/io.h>
#endif
#include <stdio.h>
#include <vga.h>
#include "host.h"
#include "d_local.h"
#include "cvar.h"
#include "cmd.h"
#include "sys.h"
#include "console.h"
#include "cvar.h"
#include "d_local.h"
#include "host.h"
#include "input.h"
#include "qargs.h"
#include "qendian.h"
#include "sys.h"
void VGA_UpdatePlanarScreen (void *srcbuffer);

View file

@ -32,25 +32,27 @@
#define _BSD
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#include <sys/time.h>
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <X11/Xatom.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>