From b356dc75aaff02126c0292bf1b0dae9f55cf9554 Mon Sep 17 00:00:00 2001 From: Spoike Date: Thu, 27 Oct 2011 16:42:53 +0000 Subject: [PATCH] linux/gcc/general fixups. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3911 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_main.c | 2 ++ engine/client/merged.h | 1 + engine/client/pr_csqc.c | 20 ++++++++++++++++++++ engine/client/pr_skelobj.c | 5 +++++ engine/client/render.h | 2 +- engine/qclib/initlib.c | 2 +- 6 files changed, 30 insertions(+), 2 deletions(-) diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index 566f196eb..566619c94 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -634,8 +634,10 @@ char *CL_TryingToConnect(void) return cls.servername; } +#ifndef CLIENTONLY int SV_NewChallenge (void); client_t *SVC_DirectConnect(void); +#endif /* ================= diff --git a/engine/client/merged.h b/engine/client/merged.h index 156a82d61..0263e330c 100644 --- a/engine/client/merged.h +++ b/engine/client/merged.h @@ -7,6 +7,7 @@ struct vbo_s; struct mesh_s; struct batch_s; struct entity_s; +struct dlight_s; diff --git a/engine/client/pr_csqc.c b/engine/client/pr_csqc.c index bd680ea97..587be4a6a 100644 --- a/engine/client/pr_csqc.c +++ b/engine/client/pr_csqc.c @@ -1,3 +1,23 @@ +/* +Copyright (C) 2011 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 the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ + #include "quakedef.h" /* diff --git a/engine/client/pr_skelobj.c b/engine/client/pr_skelobj.c index bcfbeb480..982c70a4f 100644 --- a/engine/client/pr_skelobj.c +++ b/engine/client/pr_skelobj.c @@ -22,6 +22,9 @@ this file deals with qc builtins to apply custom skeletal blending (skeletal obj */ #include "quakedef.h" + +#ifdef CSQC_DAT + #include "pr_common.h" #define MAX_SKEL_OBJECTS 1024 @@ -669,3 +672,5 @@ void QCBUILTIN PF_skel_delete (progfuncs_t *prinst, struct globalvars_s *pr_glob pendingkill = true; } } +#endif + diff --git a/engine/client/render.h b/engine/client/render.h index c61edccbd..ae25bfee2 100644 --- a/engine/client/render.h +++ b/engine/client/render.h @@ -35,7 +35,7 @@ struct model_s; struct texnums_s; struct texture_s; -static const texid_t r_nulltex = {0}; +static const texid_t r_nulltex = {{0}}; #if defined(D3DQUAKE) || defined(ANDROID) diff --git a/engine/qclib/initlib.c b/engine/qclib/initlib.c index e4b8e4366..780064ee8 100644 --- a/engine/qclib/initlib.c +++ b/engine/qclib/initlib.c @@ -106,7 +106,7 @@ void *PRAddressableAlloc(progfuncs_t *progfuncs, int ammount) } #else char *newblock; - addressablesize = (addressableused + ammount + 1024*1024) & ~(1024*1024-1); + int newsize = (addressableused + ammount + 1024*1024) & ~(1024*1024-1); newblock = realloc(newblock, addressablesize); if (newblock) {