mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2024-11-25 05:11:23 +00:00
Making things even more generic, and a fix for compiling without GL support.
This commit is contained in:
parent
620ccc3e84
commit
eae2220a78
8 changed files with 19 additions and 27 deletions
|
@ -8,6 +8,9 @@
|
|||
/* Define this to the subdirectory name of the default game */
|
||||
#undef GAMENAME
|
||||
|
||||
/* Define this if you have OGL */
|
||||
#undef HAS_OGL
|
||||
|
||||
/* Define if you have the XFree86 DGA extension */
|
||||
#undef HAS_DGA
|
||||
|
||||
|
|
|
@ -69,11 +69,7 @@ void VID_UnlockBuffer (void);
|
|||
#include "keys.h"
|
||||
#include "console.h"
|
||||
#include "view.h"
|
||||
#ifndef QUAKEWORLD
|
||||
#include "menu.h"
|
||||
#elif !defined(SERVERONLY)
|
||||
#include "menu.h"
|
||||
#endif
|
||||
#include "crc.h"
|
||||
#include "cdaudio.h"
|
||||
|
||||
|
|
|
@ -123,10 +123,10 @@ void VID_SetPalette (unsigned char *palette)
|
|||
int k;
|
||||
unsigned short i;
|
||||
unsigned *table;
|
||||
#ifdef QUAKEWORLD
|
||||
//#ifdef QUAKEWORLD
|
||||
FILE *f;
|
||||
char s[255];
|
||||
#endif
|
||||
//#endif
|
||||
float dist, bestdist;
|
||||
//
|
||||
// 8 8 8 encoding
|
||||
|
@ -150,7 +150,7 @@ void VID_SetPalette (unsigned char *palette)
|
|||
d_8to24table[255] &= 0xffffff; // 255 is transparent
|
||||
|
||||
// JACK: 3D distance calcs - k is last closest, l is the distance.
|
||||
#ifdef QUAKEWORLD
|
||||
//#ifdef QUAKEWORLD
|
||||
{
|
||||
static qboolean palflag = false;
|
||||
|
||||
|
@ -165,7 +165,7 @@ void VID_SetPalette (unsigned char *palette)
|
|||
fread(d_15to8table, 1<<15, 1, f);
|
||||
fclose(f);
|
||||
} else
|
||||
#endif // QUAKEWORLD
|
||||
//#endif // QUAKEWORLD
|
||||
{
|
||||
for (i=0; i < (1<<15); i++) {
|
||||
/* Maps
|
||||
|
@ -190,7 +190,7 @@ void VID_SetPalette (unsigned char *palette)
|
|||
}
|
||||
d_15to8table[i]=k;
|
||||
}
|
||||
#ifdef QUAKEWORLD
|
||||
//#ifdef QUAKEWORLD
|
||||
snprintf(s, sizeof(s), "%s/glquake", com_gamedir);
|
||||
Sys_mkdir (s);
|
||||
snprintf(s, sizeof(s), "%s/glquake/15to8.pal", com_gamedir);
|
||||
|
@ -198,7 +198,7 @@ void VID_SetPalette (unsigned char *palette)
|
|||
fwrite(d_15to8table, 1<<15, 1, f);
|
||||
fclose(f);
|
||||
}
|
||||
#endif // QUAKEWORLD
|
||||
//#endif // QUAKEWORLD
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#ifndef _GLQUAKE_H
|
||||
#define _GLQUAKE_H
|
||||
|
||||
#ifdef HAS_OGL
|
||||
|
||||
#if !defined(__GNUC__) && !defined(__unix) && !defined(__unix__)
|
||||
#pragma warning(disable : 4244) // MIPS
|
||||
#pragma warning(disable : 4136) // X86
|
||||
|
@ -162,9 +164,7 @@ extern qboolean envmap;
|
|||
extern int currenttexture;
|
||||
extern int cnttextures[2];
|
||||
extern int particletexture;
|
||||
#ifdef QUAKEWORLD
|
||||
extern int netgraphtexture; // netgraph texture
|
||||
#endif
|
||||
extern int playertextures;
|
||||
|
||||
extern int skytexturenum; // index in cl.loadmodel, not gl texture object
|
||||
|
@ -181,9 +181,7 @@ extern cvar_t r_shadows;
|
|||
extern cvar_t r_wateralpha;
|
||||
extern cvar_t r_dynamic;
|
||||
extern cvar_t r_novis;
|
||||
#ifdef QUAKEWORLD
|
||||
extern cvar_t r_netgraph;
|
||||
#endif
|
||||
extern cvar_t r_fog;
|
||||
extern cvar_t r_waterwarp;
|
||||
extern cvar_t r_volfog;
|
||||
|
@ -199,9 +197,7 @@ extern cvar_t gl_polyblend;
|
|||
extern cvar_t gl_keeptjunctions;
|
||||
extern cvar_t gl_flashblend;
|
||||
extern cvar_t gl_nocolors;
|
||||
#ifdef QUAKEWORLD
|
||||
extern cvar_t gl_finish;
|
||||
#endif
|
||||
extern cvar_t gl_doubleeyes;
|
||||
|
||||
extern int gl_lightmap_format;
|
||||
|
@ -281,11 +277,10 @@ void R_DrawBrushModel (entity_t *e);
|
|||
void R_DrawWorld (void);
|
||||
void GL_BuildLightmaps (void);
|
||||
|
||||
#ifdef QUAKEWORLD
|
||||
//
|
||||
// gl_ngraph.c
|
||||
//
|
||||
void R_NetGraph (void);
|
||||
#endif
|
||||
|
||||
#endif // HAS_OGL
|
||||
#endif // _GLQUAKE_H
|
||||
|
|
|
@ -155,11 +155,9 @@ extern int key_repeats[256];
|
|||
extern int key_count; // incremented every key event
|
||||
extern int key_lastpress;
|
||||
|
||||
#ifdef QUAKEWORLD
|
||||
extern char chat_buffer[];
|
||||
extern int chat_bufferlen;
|
||||
extern qboolean chat_team;
|
||||
#endif // QUAKEWORLD
|
||||
|
||||
void Key_Event (int key, qboolean down);
|
||||
void Key_Init (void);
|
||||
|
|
|
@ -125,13 +125,10 @@ extern qboolean pr_trace;
|
|||
extern dfunction_t *pr_xfunction;
|
||||
extern int pr_xstatement;
|
||||
|
||||
#ifdef QUAKEWORLD
|
||||
extern func_t SpectatorConnect;
|
||||
extern func_t SpectatorThink;
|
||||
extern func_t SpectatorDisconnect;
|
||||
#else
|
||||
extern unsigned short pr_crc;
|
||||
#endif
|
||||
|
||||
void PR_RunError (char *error, ...);
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ typedef struct efrag_s
|
|||
|
||||
typedef struct entity_s
|
||||
{
|
||||
#ifndef QUAKEWORLD
|
||||
//#ifndef QUAKEWORLD
|
||||
qboolean forcelink; // model changed
|
||||
|
||||
int update_type;
|
||||
|
@ -57,7 +57,7 @@ typedef struct entity_s
|
|||
vec3_t msg_origins[2]; // last two updates (0 is newest)
|
||||
vec3_t msg_angles[2]; // last two updates (0 is newest)
|
||||
int effects; // light, particals, etc
|
||||
#endif
|
||||
//#endif
|
||||
vec3_t origin;
|
||||
vec3_t angles;
|
||||
struct model_s *model; // NULL = no model
|
||||
|
@ -66,10 +66,10 @@ typedef struct entity_s
|
|||
float syncbase; // for client-side animations
|
||||
byte *colormap;
|
||||
int skinnum; // for Alias models
|
||||
#ifdef QUAKEWORLD
|
||||
//#ifdef QUAKEWORLD
|
||||
int keynum;
|
||||
struct player_info_s *scoreboard; // identify player
|
||||
#endif
|
||||
//#endif
|
||||
int visframe; // last frame this entity was
|
||||
// found in an active leaf
|
||||
|
||||
|
|
|
@ -289,6 +289,9 @@ if test "x$HAS_OGL" != xno; then
|
|||
fi
|
||||
CPPFLAGS="$save_CPPFLAGS"
|
||||
fi
|
||||
if test "x$HAS_OGL" = xyes; then
|
||||
AC_DEFINE(HAS_OGL)
|
||||
fi
|
||||
|
||||
dnl Make sure DGA works
|
||||
if test "x$HAS_DGA" = xyes; then
|
||||
|
|
Loading…
Reference in a new issue