Wrapped #pragma comments()'s with MSVC specific macros so GCC can be read more easily. Also undeprecated edict_size in world.h.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3800 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Lance 2011-05-29 04:26:29 +00:00
parent b56a25ba9e
commit afa29b36fb
31 changed files with 208 additions and 116 deletions

View file

@ -637,7 +637,9 @@ static qintptr_t CG_SystemCalls(void *offset, quintptr_t mask, qintptr_t fn, con
TransformedNativeTrace(mod, 0, 0, start, end, mins, maxs, brushmask, &tr, origin, angles);
#else
{
#ifdef _MSC_VER
#pragma message("FIXME: G3 CGame requires TransformedNativeTrace!")
#endif
memset(&tr, 0, sizeof(tr));
tr.allsolid = tr.startsolid = true;
tr.contents = 1;

View file

@ -1401,7 +1401,9 @@ void CL_PlayDemo_f (void)
}
#ifdef WEBCLIENT
#ifdef _MSC_VER
#pragma message("playdemo http://blah is broken right now")
#endif
#if 0
if (!strncmp(Cmd_Argv(1), "ftp://", 6) || !strncmp(Cmd_Argv(1), "http://", 7))
{

View file

@ -86,7 +86,9 @@ qboolean CL_FilterModelindex(int modelindex, int frame)
void CL_FreeDlights(void)
{
#ifdef _MSC_VER
#pragma message("not freeing shadowmeshes")
#endif
rtlights_max = cl_maxdlights = 0;
BZ_Free(cl_dlights);
cl_dlights = NULL;
@ -2223,7 +2225,9 @@ void CL_LinkPacketEntities (void)
if (model->flags & EF_ROCKET)
{
#ifdef _MSC_VER
#pragma message("Replace this flag on load for hexen2 models")
#endif
if (strncmp(model->name, "models/sflesh", 13))
{ //hmm. hexen spider gibs...
rad = 200;

View file

@ -367,7 +367,9 @@ qboolean CL_EnqueDownload(char *filename, char *localname, unsigned int flags)
return true;
}
#ifdef _MSC_VER
#pragma message("fix this")
#endif
int downloadsize;
void CL_GetDownloadSizes(unsigned int *filecount, unsigned int *totalsize, qboolean *somesizesunknown)
{
@ -2511,7 +2513,9 @@ void CLNQ_ParseServerData(void) //Doesn't change gamedir - use with caution.
}
strcpy (cl.sound_name[numsounds], str);
#ifdef _MSC_VER
#pragma message("CLNQ_ParseServerData: no sound autodownloads")
#endif
//CL_CheckOrEnqueDownloadFile(str, NULL, 0);
S_TouchSound (str);

View file

@ -1779,7 +1779,9 @@ qboolean SCR_ScreenShot (char *filename)
ext = COM_FileExtension(filename);
buffer = VID_GetRGBInfo(MAX_PREPAD, &truewidth, &trueheight);
#ifdef _MSC_VER
#pragma message("Need to ensure that the various image writing routines can cope with ((width|height)&3")
#endif
if (!buffer)
return false;

View file

@ -85,7 +85,9 @@ static void NM_PrintWhite (int cx, int cy, qbyte *str)
static void NM_PrintColoured (int cx, int cy, int colour, qbyte *str)
{
#ifdef _MSC_VER
#pragma message("NM_PrintColoured: needs reimplementing")
#endif
/*
while (*str)
{
@ -98,7 +100,9 @@ static void NM_PrintColoured (int cx, int cy, int colour, qbyte *str)
static void NM_PrintHighlighted (int cx, int cy, int colour, int bg, qbyte *str)
{
#ifdef _MSC_VER
#pragma message("NM_PrintHighlighted: needs reimplementing")
#endif
/*
while (*str)
{
@ -261,7 +265,9 @@ int M_AddColumn (int right, int y, char *text, int maxchars, int colour, int hig
right = left;
#ifdef _MSC_VER
#pragma message("M_AddColumn: needs reimplementing")
#endif
/*
if (highlight >= 0)
{

View file

@ -591,7 +591,9 @@ void Master_AddMaster (char *address, int type, char *description)
return;
}
#ifdef _MSC_VER
#pragma message("Master_AddMaster: add ipv6. don't care about tcp/irc.")
#endif
if (adr.type != NA_IP && adr.type != NA_IPX)
{
Con_Printf("Fixme: unable to poll address family for \"%s\"\n", address);
@ -795,7 +797,9 @@ void NET_SendPollPacket(int len, void *data, netadr_t to)
int ret;
struct sockaddr_qstorage addr;
#ifdef _MSC_VER
#pragma message("NET_SendPollPacket: no support for ipv6")
#endif
NetadrToSockadr (&to, &addr);
#ifdef USEIPX

View file

@ -3778,7 +3778,9 @@ static void GL_DrawTrifanParticle(int count, particle_t **plist, plooks_t *type)
static void GL_DrawLineSparkParticle(int count, particle_t **plist, plooks_t *type)
{
#ifdef _MSC_VER
#pragma message("fixme: no line sparks")
#endif
#if 0
particle_t *p;

View file

@ -1129,7 +1129,7 @@ static void QCBUILTIN PF_R_GetViewFlag(progfuncs_t *prinst, struct globalvars_s
*r = r_refdef.fov_y;
break;
#ifndef MINGW
#ifdef _MSC_VER
#pragma message("fixme: AFOV not retrievable")
#endif
case VF_AFOV:
@ -3304,7 +3304,9 @@ static void QCBUILTIN PF_cs_gettaginfo (progfuncs_t *prinst, struct globalvars_s
cs_getframestate(ent, ent->xv->renderflags, &fstate);
#ifdef _MSC_VER
#pragma message("PF_cs_gettaginfo: This function doesn't honour attachments (but setattachment isn't implemented yet anyway)")
#endif
if (!Mod_GetTag(mod, tagnum, &fstate, transforms))
{
memset(transforms, 0, sizeof(transforms));
@ -5763,7 +5765,9 @@ static void CSQC_GameCommand_f(void)
PR_ExecuteProgram (csqcprogs, csqcg.gamecommand);
}
#ifdef _MSC_VER
#pragma message("do we really need the firstbyte parameter here?")
#endif
qboolean CSQC_ParseTempEntity(unsigned char firstbyte)
{
void *pr_globals;

View file

@ -1954,7 +1954,9 @@ qboolean MP_Init (void)
if (mp_time)
*mp_time = Sys_DoubleTime();
#ifdef _MSC_VER
#pragma message("disabled until csqc gets forked or some such")
#endif
//mp_globs.drawfont = (float*)PR_FindGlobal(menuprogs, "drawfont", 0, NULL);
//mp_globs.drawfontscale = (float*)PR_FindGlobal(menuprogs, "drawfontscale", 0, NULL);

View file

@ -103,7 +103,9 @@ void R2D_Init(void)
Font_Init();
#ifdef _MSC_VER
#pragma message("Fixme: move conwidth handling into here")
#endif
missing_texture = R_LoadTexture8("no_texture", 16, 16, (unsigned char*)r_notexture_mip + r_notexture_mip->offsets[0], IF_NOALPHA|IF_NOGAMMA, 0);
translate_texture = r_nulltex;

View file

@ -22,7 +22,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "quakedef.h"
#include "shader.h"
#ifdef _MSC_VER
#pragma message("hipnotic/rogue: Find out")
#endif
#define FINDOUT 1024
extern cvar_t hud_tracking_show;

View file

@ -181,7 +181,9 @@ void S_PaintChannels(soundcardinfo_t *sc, int endtime)
// start = ch->end - scache->length;
// samples = end - start;
#ifdef _MSC_VER
#pragma message("pitch fix needed")
#endif
ch->sfx->decoder->decodemore(ch->sfx,
end - (ch->end - scache->length) + 1);
// ch->pos + end-ltime+1);

View file

@ -1919,7 +1919,9 @@ static void *Alias_LoadFrameGroup (daliasframetype_t *pframetype, int *seamremap
pose->ofssvector = (char *)svec - (char *)pose;
pose->ofstvector = (char *)tvec - (char *)pose;
#else
#ifdef _MSC_VER
#pragma message("wasted memory")
#endif
#endif
if (mdltype == 2)
@ -3122,7 +3124,9 @@ qboolean Mod_GetTag(model_t *model, int tagnum, framestate_t *fstate, float *res
float f1time, f2time;
float f2ness;
#ifdef _MSC_VER
#pragma message("fixme")
#endif
frame1 = fstate->g[FS_REG].frame[0];
frame2 = fstate->g[FS_REG].frame[1];
f1time = fstate->g[FS_REG].frametime[0];

View file

@ -43,7 +43,7 @@ void *zlib_handle;
#endif
#endif
#pragma comment(lib, MSVCLIBSPATH "zlib.lib")
//#pragma comment(lib, MSVCLIBSPATH "zlib.lib")
static int (ZEXPORT *qinflateEnd) OF((z_streamp strm)) ZSTATIC(inflateEnd);
static int (ZEXPORT *qinflate) OF((z_streamp strm, int flush)) ZSTATIC(inflate);

View file

@ -23,7 +23,9 @@ struct sockaddr;
#include "quakedef.h"
#include "netinc.h"
#ifdef _MSC_VER
#pragma message("these two are never set. A NET_ReplySource function that returns the address a reply would originate from would be sufficient. Note that INADDR_ANY can be multiple however, so these are just a hint.")
#endif
netadr_t net_local_cl_ipadr; //still used to match local ui requests, and to generate ip reports for q3 servers.
netadr_t net_from;

View file

@ -123,7 +123,7 @@ struct world_s
int *global_self;
unsigned int max_edicts; //limiting factor... 1024 fields*4*MAX_EDICTS == a heck of a lot.
unsigned int num_edicts; // increases towards MAX_EDICTS
FTE_DEPRECATED unsigned int edict_size; //still used in copyentity
/*FTE_DEPRECATED*/ unsigned int edict_size; //still used in copyentity
wedict_t *edicts; // can NOT be array indexed.
struct progfuncs_s *progs;
qboolean usesolidcorpse;

View file

@ -804,7 +804,9 @@ static void colourgenbyte(const shaderpass_t *pass, int cnt, byte_vec4_t *src, b
case RGB_GEN_TOPCOLOR:
case RGB_GEN_BOTTOMCOLOR:
#ifdef _MSC_VER
#pragma message("fix 24bit player colours")
#endif
block = D3DCOLOR_RGBA(255, 255, 255, 255);
while((cnt)--)
{

View file

@ -1060,7 +1060,9 @@ static void (D3D9_SCR_UpdateScreen) (void)
RSpeedEnd(RSPEED_TOTALREFRESH);
RSpeedShow();
#ifdef _MSC_VER
#pragma message("Fixme: ... to here")
#endif
d3d9error(IDirect3DDevice9_EndScene(pD3DDev9));

View file

@ -2032,7 +2032,9 @@ static void BE_SendPassBlendDepthMask(unsigned int sbits)
unsigned int delta;
/*2d mode doesn't depth test or depth write*/
#ifdef _MSC_VER
#pragma message("fixme: q3 doesn't seem to have this, why do we need it?")
#endif
if (shaderstate.force2d)
{
sbits &= ~(SBITS_MISC_DEPTHWRITE|SBITS_MISC_DEPTHEQUALONLY);
@ -2457,7 +2459,9 @@ static unsigned int BE_Program_Set_Attribute(const shaderprogparm_t *p, unsigned
case SP_EYEPOS:
{
float m16[16];
#ifdef _MSC_VER
#pragma message("is this correct?")
#endif
// vec3_t t1;
vec3_t t2;
Matrix4_ModelMatrixFromAxis(m16, shaderstate.curentity->axis[0], shaderstate.curentity->axis[1], shaderstate.curentity->axis[2], shaderstate.curentity->origin);
@ -2469,7 +2473,9 @@ static unsigned int BE_Program_Set_Attribute(const shaderprogparm_t *p, unsigned
break;
case SP_LIGHTPOSITION:
{
#ifdef _MSC_VER
#pragma message("is this correct?")
#endif
float inv[16];
float m16[16];
// vec3_t t1;
@ -2911,7 +2917,9 @@ static void DrawMeshes(void)
#endif
case BEM_DEPTHONLY:
GL_DeSelectProgram();
#ifdef _MSC_VER
#pragma message("fixme: support alpha test")
#endif
GL_ApplyVertexPointer();
BE_SubmitMeshChain();
break;

View file

@ -506,7 +506,9 @@ void R_BloomBlend (void)
return;
PPL_RevertToKnownState();
#ifdef _MSC_VER
#pragma message("Note: Bloom doesn't use the backend.")
#endif
//set up full screen workspace
qglViewport(0, 0, vid.pixelwidth, vid.pixelheight);

View file

@ -861,7 +861,9 @@ void GLR_DrawPortal(batch_t *batch, batch_t **blist)
GL_CullFace(0);
#ifdef _MSC_VER
#pragma message("warning: there's a bug with rtlights in portals, culling is broken or something. May also be loading the wrong matrix")
#endif
}
@ -948,7 +950,9 @@ static void R_RenderMotionBlur(void)
{
int vwidth = 1, vheight = 1;
float vs, vt, cs, ct;
#ifdef _MSC_VER
#pragma message("backend fixme")
#endif
Con_Printf("motionblur is not updated for the backend\n");
if (gl_config.arb_texture_non_power_of_two)

View file

@ -2769,7 +2769,9 @@ void Shader_SetBlendmode (shaderpass_t *pass)
}
else
{
#ifdef _MSC_VER
#pragma message("is this correct?")
#endif
pass->shaderbits &= ~SBITS_BLEND_BITS;
pass->shaderbits |= SBITS_SRCBLEND_ONE;
pass->shaderbits |= SBITS_DSTBLEND_ZERO;
@ -2911,7 +2913,9 @@ void Shader_Readpass (shader_t *shader, char **ptr)
if ((shader->flags & SHADER_SKY) && (shader->flags & SHADER_DEPTHWRITE))
{
#ifdef _MSC_VER
#pragma message("is this valid?")
#endif
pass->shaderbits &= ~SBITS_MISC_DEPTHWRITE;
}
}

View file

@ -1604,7 +1604,9 @@ static void Sh_DrawEntLighting(dlight_t *light, vec3_t colour)
#define PROJECTION_DISTANCE (float)(dl->radius*2)//0x7fffffff
/*Fixme: this is brute forced*/
#ifdef _MSC_VER
#pragma message("brush shadows are bruteforced")
#endif
static void Sh_DrawBrushModelShadow(dlight_t *dl, entity_t *e)
{
int v;

View file

@ -41,8 +41,10 @@ extern int hunksize;
#include "progtype.h"
#include "progslib.h"
#ifdef _MSC_VER
#pragma warning(disable : 4244)
#pragma warning(disable : 4267)
#endif
//extern progfuncs_t *progfuncs;

View file

@ -951,7 +951,9 @@ void NPP_NQWriteByte(int dest, qbyte data) //replacement write func (nq to qw)
protocollen++;
if (data & DPSND_LARGESOUND)
protocollen++;
#ifdef _MSC_VER
#pragma message("NPP_NQWriteByte: this ignores SVC_SOUND from nq mods (nexuiz)")
#endif
ignoreprotocol = true;
break;
case svc_temp_entity:

View file

@ -7110,7 +7110,9 @@ static void QCBUILTIN PF_CustomTEnt(progfuncs_t *prinst, struct globalvars_s *pr
static void QCBUILTIN PF_sv_particleeffectnum(progfuncs_t *prinst, struct globalvars_s *pr_globals)
{
#ifdef PEXT_CSQC
#ifdef _MSC_VER
#pragma message("PF_sv_particleeffectnum: which effect index values to use?")
#endif
char *efname = PR_GetStringOfs(prinst, OFS_PARM0);
G_FLOAT(OFS_RETURN) = COM_Effectinfo_ForName(efname);
#else
@ -8208,7 +8210,9 @@ static void QCBUILTIN PF_sv_gettaginfo(progfuncs_t *prinst, struct globalvars_s
if (ent->xv->tag_entity)
{
#ifdef _MSC_VER
#pragma message("PF_sv_gettaginfo: This function doesn't honour attachments")
#endif
Con_Printf("PF_sv_gettaginfo doesn't support attachments\n");
}

View file

@ -553,7 +553,9 @@ void SV_DropClient (client_t *drop)
if (drop->netchan.remote_address.type == NA_LOOPBACK)
{
Netchan_Transmit(&drop->netchan, 0, "", SV_RateForClient(drop));
#ifdef _MSC_VER
#pragma message("This mans that we may not see the reason we kicked ourselves.")
#endif
CL_Disconnect();
drop->state = cs_free; //don't do zombie stuff
}
@ -871,7 +873,9 @@ void SV_FullClientUpdate (client_t *client, sizebuf_t *buf, unsigned int ftepext
MSG_WriteByte (buf, i);
MSG_WriteFloat (buf, realtime - client->connection_started);
#ifdef _MSC_VER
#pragma message("this is a bug: it can be broadcast to all qw clients")
#endif
if (ftepext & PEXT_BIGUSERINFOS)
Q_strncpyz (info, client->userinfo, sizeof(info));
else
@ -1053,9 +1057,9 @@ void SVC_Status (void)
if (slots>12)
Con_Printf ("5013 23 64 94 \"DeathBunny\" \"soldier\" 13 13\n");
if (slots>10)
Con_Printf ("5010 32 85 162 \"<EFBFBD><EFBFBD>\" \"hacker\" 13 13\n");
Con_Printf ("5010 32 85 162 \"??\" \"hacker\" 13 13\n");
if (slots>8)
Con_Printf ("5011 32 85 162 \"<EFBFBD><EFBFBD>a<EFBFBD><EFBFBD><EFBFBD>\" \"hacker\" 4 4\n");
Con_Printf ("5011 32 85 162 \"??a???\" \"hacker\" 4 4\n");
*/
SV_EndRedirect ();
}
@ -3155,7 +3159,9 @@ qboolean SV_ReadPackets (void)
#ifdef Q3SERVER
if (ISQ3CLIENT(cl))
{
#ifdef _MSC_VER
#pragma message("qwoverq3: fixme: this will block qw+q3 clients from the same ip")
#endif
if (cl->state != cs_zombie)
{
received++;

View file

@ -24,7 +24,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "pr_common.h"
#ifdef _MSC_VER
#pragma message("fixme, fix this up before adding to csqc")
#endif
extern nqglobalvars_t realpr_nqglobal_struct;
/*

View file

@ -5907,7 +5907,9 @@ void SV_ExecuteClientMessage (client_t *cl)
if (temp1.ival)
frame = &cl->frameunion.frames[(cl->netchan.incoming_acknowledged+temp1.ival) & UPDATE_MASK];
*/
#ifdef _MSC_VER
#pragma message("FIXME: make antilag optionally support non-player ents too")
#endif
for (i = 0; i < sv.allocated_client_slots; i++)
{
cl->laggedents[i].present = frame->playerpresent[i];

View file

@ -2139,7 +2139,9 @@ q3playerState_t *SVQ3Q1_BuildPlayerState(client_t *client)
memset(&state, 0, sizeof(state));
#ifdef _MSC_VER
#pragma message("qwoverq3: other things will need to be packed into here.")
#endif
state.commandTime = client->lastcmd.servertime;
@ -2350,7 +2352,9 @@ void SVQ3_BuildClientSnapshot( client_t *client )
void SVQ3Q1_ConvertEntStateQ1ToQ3(entity_state_t *q1, q3entityState_t *q3)
{
#ifdef _MSC_VER
#pragma message("qwoverq3: This _WILL_ need extending")
#endif
q3->number = q1->number;
q3->pos.trTime = 0;
@ -2864,7 +2868,9 @@ void SVQ3_ParseUsercmd(client_t *client, qboolean delta)
{
usercmd_t temp;
temp = client->lastcmd;
#ifdef _MSC_VER
#pragma message("qwoverq3: you need to be aware of this if you're making a compatible cgame")
#endif
//if you read the q3 code, you'll see that the speed value used is 64 for walking, and 127 for running (full speed).
//so we map full to full here.
temp.sidemove *= client->maxspeed/127.0f;