Fix some compile issues.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5339 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
2ee8387644
commit
cb0f6fa6aa
9 changed files with 23 additions and 8 deletions
|
@ -51,10 +51,9 @@ struct shader_s;
|
|||
|
||||
#if 1 //c++ or standard C
|
||||
#include "cl_master.h"
|
||||
#else
|
||||
enum slist_test_e;
|
||||
enum hostcachekey_e; //obtained via calls to gethostcacheindexforkey
|
||||
#endif
|
||||
enum slist_test_e;
|
||||
enum hostcachekey_e; //obtained via calls to gethostcacheindexforkey
|
||||
enum fs_relative;
|
||||
enum com_tokentype_e;
|
||||
|
||||
|
|
|
@ -3057,7 +3057,7 @@ void SCR_ScreenShot_Cubemap_f(void)
|
|||
VectorCopy(oldangles, cl.playerview->viewangles);
|
||||
}
|
||||
|
||||
|
||||
#ifdef IMAGEFMT_PCX
|
||||
// from gl_draw.c
|
||||
qbyte *draw_chars; // 8*8 graphic characters
|
||||
|
||||
|
@ -3116,6 +3116,7 @@ static void SCR_DrawStringToSnap (const char *s, qbyte *buf, int x, int y, int w
|
|||
SCR_RSShot
|
||||
==================
|
||||
*/
|
||||
int MipColor(int r, int g, int b);
|
||||
qboolean SCR_RSShot (void)
|
||||
{
|
||||
int stride;
|
||||
|
@ -3251,6 +3252,7 @@ qboolean SCR_RSShot (void)
|
|||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
|
||||
|
|
|
@ -69,6 +69,7 @@ static image_t *imagelist;
|
|||
|
||||
|
||||
|
||||
#if defined(AVAIL_JPEGLIB) || defined(AVAIL_PNGLIB)
|
||||
static void GenerateXMPData(char *blob, size_t blobsize, int width, int height, unsigned int metainfo)
|
||||
{ //XMP is a general thing that applies to multiple formats - or at least png+jpeg.
|
||||
//we need this if we want to correctly flag the data as a 360 image.
|
||||
|
@ -104,6 +105,7 @@ static void GenerateXMPData(char *blob, size_t blobsize, int width, int height,
|
|||
);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
|
@ -8645,4 +8647,4 @@ qboolean SCR_ScreenShot (char *filename, enum fs_relative fsroot, void **buffer,
|
|||
else //extension / type not recognised.
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1482,6 +1482,7 @@ qboolean R_ApplyRenderer_Load (rendererstate_t *newr)
|
|||
host_basepal = (qbyte *)FS_LoadMallocFile ("gfx/palette.lmp", &sz);
|
||||
if (!host_basepal)
|
||||
host_basepal = (qbyte *)FS_LoadMallocFile ("wad/playpal", &sz);
|
||||
#if defined(Q2CLIENT) && defined(IMAGEFMT_PCX)
|
||||
if (!host_basepal || sz != 768)
|
||||
{
|
||||
qbyte *pcx=NULL;
|
||||
|
@ -1499,6 +1500,7 @@ qboolean R_ApplyRenderer_Load (rendererstate_t *newr)
|
|||
goto q2colormap; //skip the colormap.lmp file as we already read it
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
qbyte *colormap = (qbyte *)FS_LoadMallocFile ("gfx/colormap.lmp", NULL);
|
||||
|
@ -1527,7 +1529,9 @@ qboolean R_ApplyRenderer_Load (rendererstate_t *newr)
|
|||
if (vid.fullbright < 2)
|
||||
vid.fullbright = 0; //transparent colour doesn't count.
|
||||
|
||||
#if defined(Q2CLIENT) && defined(IMAGEFMT_PCX)
|
||||
q2colormap:
|
||||
#endif
|
||||
|
||||
TRACE(("dbg: R_ApplyRenderer: Palette loaded\n"));
|
||||
|
||||
|
|
|
@ -2636,11 +2636,13 @@ static void Cmd_ForwardToServer_f (void)
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef IMAGEFMT_PCX
|
||||
if (Q_strcasecmp(Cmd_Argv(1), "snap") == 0 && cls.protocol == CP_QUAKEWORLD)
|
||||
{
|
||||
if (SCR_RSShot())
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#ifdef NQPROT
|
||||
if (Q_strcasecmp(Cmd_Argv(1), "protocols") == 0 && cls.protocol == CP_NETQUAKE)
|
||||
{
|
||||
|
|
|
@ -6708,6 +6708,7 @@ size_t CM_WritePortalState (model_t *mod, void **data)
|
|||
*data = prv->q2portalopen;
|
||||
return sizeof(prv->q2portalopen);
|
||||
#endif
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
*data = NULL;
|
||||
|
@ -6756,6 +6757,7 @@ qofs_t CM_ReadPortalState (model_t *mod, qbyte *ptr, qofs_t ptrsize)
|
|||
}
|
||||
break;
|
||||
#endif
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -767,6 +767,7 @@ texid_t R_LoadColourmapImage(void)
|
|||
unsigned int x;
|
||||
unsigned int data[256*(VID_GRADES)];
|
||||
qbyte *colourmappal = (qbyte *)FS_LoadMallocFile ("gfx/colormap.lmp", NULL);
|
||||
#if defined(Q2CLIENT) && defined(IMAGEFMT_PCX)
|
||||
if (!colourmappal)
|
||||
{
|
||||
size_t sz;
|
||||
|
@ -778,6 +779,7 @@ texid_t R_LoadColourmapImage(void)
|
|||
BZ_Free(pcx);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (colourmappal)
|
||||
{
|
||||
for (x = 0; x < sizeof(data)/sizeof(data[0]); x++)
|
||||
|
|
|
@ -629,7 +629,9 @@ qboolean World_MoveToGoal (world_t *world, wedict_t *ent, float dist)
|
|||
|
||||
|
||||
#ifdef ENGINE_ROUTING
|
||||
#ifndef SERVERONLY
|
||||
static cvar_t route_shownodes = CVAR("route_shownodes", "0");
|
||||
#endif
|
||||
|
||||
#define LF_EDGE 0x00000001
|
||||
#define LF_JUMP 0x00000002
|
||||
|
|
|
@ -380,17 +380,17 @@ void INS_EnumerateDevices(void *ctx, void(*callback)(void *ctx, const char *type
|
|||
char foobar[64];
|
||||
for (i = 0; i < countof(gamepaddeviceids); i++)
|
||||
{
|
||||
Q_snprintfz(foobar, sizeof(foobar), "gp%i", i);
|
||||
Q_snprintfz(foobar, sizeof(foobar), "gp%i", (int)i);
|
||||
callback(ctx, "gamepad", foobar, &gamepaddeviceids[i]);
|
||||
}
|
||||
for (i = 0; i < countof(mouseid); i++)
|
||||
{
|
||||
Q_snprintfz(foobar, sizeof(foobar), "m%i", i);
|
||||
Q_snprintfz(foobar, sizeof(foobar), "m%i", (int)i);
|
||||
callback(ctx, "mouse", foobar, &mouseid[i]);
|
||||
}
|
||||
for (i = 0; i < countof(keyboardid); i++)
|
||||
{
|
||||
Q_snprintfz(foobar, sizeof(foobar), "kb%i", i);
|
||||
Q_snprintfz(foobar, sizeof(foobar), "kb%i", (int)i);
|
||||
callback(ctx, "keyboard", foobar, &keyboardid[i]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue