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

@ -192,7 +192,7 @@ typedef enum {
CG_LAST_ATTACKER, CG_LAST_ATTACKER,
// int (*CG_LastAttacker)( void ); // int (*CG_LastAttacker)( void );
CG_KEY_EVENT, CG_KEY_EVENT,
// void (*CG_KeyEvent)( int key, qboolean down ); // void (*CG_KeyEvent)( int key, qboolean down );
CG_MOUSE_EVENT, CG_MOUSE_EVENT,
@ -320,7 +320,7 @@ typedef struct {
int serverTime; int serverTime;
int angles[3]; int angles[3];
int buttons; int buttons;
qbyte weapon; // weapon qbyte weapon; // weapon
signed char forwardmove, rightmove, upmove; signed char forwardmove, rightmove, upmove;
} q3usercmd_t; } q3usercmd_t;
#define CMD_MASK Q3UPDATE_MASK #define CMD_MASK Q3UPDATE_MASK
@ -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); TransformedNativeTrace(mod, 0, 0, start, end, mins, maxs, brushmask, &tr, origin, angles);
#else #else
{ {
#ifdef _MSC_VER
#pragma message("FIXME: G3 CGame requires TransformedNativeTrace!") #pragma message("FIXME: G3 CGame requires TransformedNativeTrace!")
#endif
memset(&tr, 0, sizeof(tr)); memset(&tr, 0, sizeof(tr));
tr.allsolid = tr.startsolid = true; tr.allsolid = tr.startsolid = true;
tr.contents = 1; tr.contents = 1;

View file

@ -8,7 +8,7 @@ of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the included (GNU.txt) GNU General Public License for more details. See the included (GNU.txt) GNU General Public License for more details.
@ -386,7 +386,7 @@ qboolean CL_GetDemoMessage (void)
} }
#ifdef NQPROT #ifdef NQPROT
if (cls.demoplayback == DPB_NETQUAKE if (cls.demoplayback == DPB_NETQUAKE
#ifdef Q2CLIENT #ifdef Q2CLIENT
|| cls.demoplayback == DPB_QUAKE2 || cls.demoplayback == DPB_QUAKE2
#endif #endif
@ -415,7 +415,7 @@ qboolean CL_GetDemoMessage (void)
#ifdef Q2CLIENT #ifdef Q2CLIENT
if (cls.demoplayback == DPB_QUAKE2 && (cls.netchan.last_received == realtime || cls.netchan.last_received > realtime-0.1)) if (cls.demoplayback == DPB_QUAKE2 && (cls.netchan.last_received == realtime || cls.netchan.last_received > realtime-0.1))
return 0; return 0;
else else
#endif #endif
if (cls.demoplayback == DPB_NETQUAKE && cls.signon == 4/*SIGNONS*/) if (cls.demoplayback == DPB_NETQUAKE && cls.signon == 4/*SIGNONS*/)
{ {
@ -484,7 +484,7 @@ qboolean CL_GetDemoMessage (void)
} }
demo_flushbytes(demopos); demo_flushbytes(demopos);
net_message.cursize = msglength; net_message.cursize = msglength;
return 1; return 1;
} }
#endif #endif
@ -530,7 +530,7 @@ readnext:
demotime = LittleFloat(demotime); demotime = LittleFloat(demotime);
} }
// decide if it is time to grab the next message // decide if it is time to grab the next message
if (cls.timedemo) if (cls.timedemo)
{ {
if (cls.state == ca_active) if (cls.state == ca_active)
@ -542,7 +542,7 @@ readnext:
cls.td_lastframe = host_framecount; cls.td_lastframe = host_framecount;
return 0; // already read this frame's message return 0; // already read this frame's message
} }
if (cls.td_startframe == -1) if (cls.td_startframe == -1)
{ //start the timer only once we are connected. { //start the timer only once we are connected.
cls.td_starttime = Sys_DoubleTime(); cls.td_starttime = Sys_DoubleTime();
cls.td_startframe = host_framecount; cls.td_startframe = host_framecount;
@ -585,7 +585,7 @@ readnext:
if (cls.state < ca_demostart) if (cls.state < ca_demostart)
Host_Error ("CL_GetDemoMessage: cls.state != ca_active"); Host_Error ("CL_GetDemoMessage: cls.state != ca_active");
// get the msg type // get the msg type
if (!readdemobytes (&demopos, &c, sizeof(c))) if (!readdemobytes (&demopos, &c, sizeof(c)))
{ {
@ -796,7 +796,7 @@ qboolean CL_GetMessage (void)
return false; return false;
CL_WriteDemoMessage (&net_message); CL_WriteDemoMessage (&net_message);
return true; return true;
} }
@ -937,7 +937,7 @@ void CL_Record_f (void)
if (cls.demorecording) if (cls.demorecording)
CL_Stop_f(); CL_Stop_f();
if (c == 2) //user supplied a name if (c == 2) //user supplied a name
{ {
fname = Cmd_Argv(1); fname = Cmd_Argv(1);
@ -973,7 +973,7 @@ void CL_Record_f (void)
else if (i > 2) else if (i > 2)
{ // FFA { // FFA
fname = va ("%s_ffa_%s", fname = va ("%s_ffa_%s",
TP_PlayerName(), TP_PlayerName(),
TP_MapName()); TP_MapName());
} }
else else
@ -1111,7 +1111,7 @@ void CL_Record_f (void)
#endif #endif
// flush packet // flush packet
CL_WriteRecordDemoMessage (&buf, seq++); CL_WriteRecordDemoMessage (&buf, seq++);
SZ_Clear (&buf); SZ_Clear (&buf);
// soundlist // soundlist
MSG_WriteByte (&buf, svc_soundlist); MSG_WriteByte (&buf, svc_soundlist);
@ -1127,7 +1127,7 @@ void CL_Record_f (void)
MSG_WriteByte (&buf, 0); MSG_WriteByte (&buf, 0);
MSG_WriteByte (&buf, n); MSG_WriteByte (&buf, n);
CL_WriteRecordDemoMessage (&buf, seq++); CL_WriteRecordDemoMessage (&buf, seq++);
SZ_Clear (&buf); SZ_Clear (&buf);
MSG_WriteByte (&buf, svc_soundlist); MSG_WriteByte (&buf, svc_soundlist);
MSG_WriteByte (&buf, n + 1); MSG_WriteByte (&buf, n + 1);
} }
@ -1139,7 +1139,7 @@ void CL_Record_f (void)
MSG_WriteByte (&buf, 0); MSG_WriteByte (&buf, 0);
MSG_WriteByte (&buf, 0); MSG_WriteByte (&buf, 0);
CL_WriteRecordDemoMessage (&buf, seq++); CL_WriteRecordDemoMessage (&buf, seq++);
SZ_Clear (&buf); SZ_Clear (&buf);
} }
// modellist // modellist
@ -1156,7 +1156,7 @@ void CL_Record_f (void)
MSG_WriteByte (&buf, 0); MSG_WriteByte (&buf, 0);
MSG_WriteByte (&buf, n); MSG_WriteByte (&buf, n);
CL_WriteRecordDemoMessage (&buf, seq++); CL_WriteRecordDemoMessage (&buf, seq++);
SZ_Clear (&buf); SZ_Clear (&buf);
MSG_WriteByte (&buf, svc_modellist); MSG_WriteByte (&buf, svc_modellist);
MSG_WriteByte (&buf, n + 1); MSG_WriteByte (&buf, n + 1);
} }
@ -1168,7 +1168,7 @@ void CL_Record_f (void)
MSG_WriteByte (&buf, 0); MSG_WriteByte (&buf, 0);
MSG_WriteByte (&buf, 0); MSG_WriteByte (&buf, 0);
CL_WriteRecordDemoMessage (&buf, seq++); CL_WriteRecordDemoMessage (&buf, seq++);
SZ_Clear (&buf); SZ_Clear (&buf);
} }
// spawnstatic // spawnstatic
@ -1199,7 +1199,7 @@ void CL_Record_f (void)
if (buf.cursize > MAX_QWMSGLEN/2) if (buf.cursize > MAX_QWMSGLEN/2)
{ {
CL_WriteRecordDemoMessage (&buf, seq++); CL_WriteRecordDemoMessage (&buf, seq++);
SZ_Clear (&buf); SZ_Clear (&buf);
} }
} }
@ -1214,7 +1214,7 @@ void CL_Record_f (void)
if (memcmp(es, &nullentitystate, sizeof(nullentitystate))) if (memcmp(es, &nullentitystate, sizeof(nullentitystate)))
{ {
MSG_WriteByte (&buf,svc_spawnbaseline); MSG_WriteByte (&buf,svc_spawnbaseline);
MSG_WriteShort (&buf, i); MSG_WriteShort (&buf, i);
MSG_WriteByte (&buf, es->modelindex); MSG_WriteByte (&buf, es->modelindex);
@ -1230,7 +1230,7 @@ void CL_Record_f (void)
if (buf.cursize > MAX_QWMSGLEN/2) if (buf.cursize > MAX_QWMSGLEN/2)
{ {
CL_WriteRecordDemoMessage (&buf, seq++); CL_WriteRecordDemoMessage (&buf, seq++);
SZ_Clear (&buf); SZ_Clear (&buf);
} }
} }
} }
@ -1241,7 +1241,7 @@ void CL_Record_f (void)
if (buf.cursize) if (buf.cursize)
{ {
CL_WriteRecordDemoMessage (&buf, seq++); CL_WriteRecordDemoMessage (&buf, seq++);
SZ_Clear (&buf); SZ_Clear (&buf);
} }
// send current status of all other players // send current status of all other players
@ -1253,15 +1253,15 @@ void CL_Record_f (void)
MSG_WriteByte (&buf, svc_updatefrags); MSG_WriteByte (&buf, svc_updatefrags);
MSG_WriteByte (&buf, i); MSG_WriteByte (&buf, i);
MSG_WriteShort (&buf, player->frags); MSG_WriteShort (&buf, player->frags);
MSG_WriteByte (&buf, svc_updateping); MSG_WriteByte (&buf, svc_updateping);
MSG_WriteByte (&buf, i); MSG_WriteByte (&buf, i);
MSG_WriteShort (&buf, player->ping); MSG_WriteShort (&buf, player->ping);
MSG_WriteByte (&buf, svc_updatepl); MSG_WriteByte (&buf, svc_updatepl);
MSG_WriteByte (&buf, i); MSG_WriteByte (&buf, i);
MSG_WriteByte (&buf, player->pl); MSG_WriteByte (&buf, player->pl);
MSG_WriteByte (&buf, svc_updateentertime); MSG_WriteByte (&buf, svc_updateentertime);
MSG_WriteByte (&buf, i); MSG_WriteByte (&buf, i);
MSG_WriteFloat (&buf, player->entertime); MSG_WriteFloat (&buf, player->entertime);
@ -1274,10 +1274,10 @@ void CL_Record_f (void)
if (buf.cursize > MAX_QWMSGLEN/2) if (buf.cursize > MAX_QWMSGLEN/2)
{ {
CL_WriteRecordDemoMessage (&buf, seq++); CL_WriteRecordDemoMessage (&buf, seq++);
SZ_Clear (&buf); SZ_Clear (&buf);
} }
} }
// send all current light styles // send all current light styles
for (i=0 ; i<MAX_LIGHTSTYLES ; i++) for (i=0 ; i<MAX_LIGHTSTYLES ; i++)
{ {
@ -1300,7 +1300,7 @@ void CL_Record_f (void)
if (buf.cursize > MAX_QWMSGLEN/2) if (buf.cursize > MAX_QWMSGLEN/2)
{ {
CL_WriteRecordDemoMessage (&buf, seq++); CL_WriteRecordDemoMessage (&buf, seq++);
SZ_Clear (&buf); SZ_Clear (&buf);
} }
} }
@ -1350,7 +1350,7 @@ void CL_ReRecord_f (void)
Con_Printf ("Relative paths not allowed.\n"); Con_Printf ("Relative paths not allowed.\n");
return; return;
} }
sprintf (name, "%s", s); sprintf (name, "%s", s);
// //
@ -1401,7 +1401,9 @@ void CL_PlayDemo_f (void)
} }
#ifdef WEBCLIENT #ifdef WEBCLIENT
#ifdef _MSC_VER
#pragma message("playdemo http://blah is broken right now") #pragma message("playdemo http://blah is broken right now")
#endif
#if 0 #if 0
if (!strncmp(Cmd_Argv(1), "ftp://", 6) || !strncmp(Cmd_Argv(1), "http://", 7)) if (!strncmp(Cmd_Argv(1), "ftp://", 6) || !strncmp(Cmd_Argv(1), "http://", 7))
{ {
@ -1758,7 +1760,7 @@ void CL_QTVPoll (void)
} }
//end of sourcelist entry //end of sourcelist entry
//from e to s, we have a line //from e to s, we have a line
s = e+1; s = e+1;
} }
e++; e++;
@ -2161,7 +2163,7 @@ void CL_TimeDemo_f (void)
} }
CL_PlayDemo_f (); CL_PlayDemo_f ();
if (cls.state != ca_demostart) if (cls.state != ca_demostart)
return; return;
@ -2169,7 +2171,7 @@ void CL_TimeDemo_f (void)
// cls.td_starttime will be grabbed at the second frame of the demo, so // cls.td_starttime will be grabbed at the second frame of the demo, so
// all the loading time doesn't get counted // all the loading time doesn't get counted
cls.timedemo = true; cls.timedemo = true;
cls.td_starttime = Sys_DoubleTime(); cls.td_starttime = Sys_DoubleTime();
cls.td_startframe = -1; cls.td_startframe = -1;

View file

@ -86,7 +86,9 @@ qboolean CL_FilterModelindex(int modelindex, int frame)
void CL_FreeDlights(void) void CL_FreeDlights(void)
{ {
#ifdef _MSC_VER
#pragma message("not freeing shadowmeshes") #pragma message("not freeing shadowmeshes")
#endif
rtlights_max = cl_maxdlights = 0; rtlights_max = cl_maxdlights = 0;
BZ_Free(cl_dlights); BZ_Free(cl_dlights);
cl_dlights = NULL; cl_dlights = NULL;
@ -576,7 +578,7 @@ void CL_ParsePacketEntities (qboolean delta)
if (newindex >= newp->max_entities) if (newindex >= newp->max_entities)
{ {
newp->max_entities = newindex+1; newp->max_entities = newindex+1;
newp->entities = BZ_Realloc(newp->entities, sizeof(entity_state_t)*newp->max_entities); newp->entities = BZ_Realloc(newp->entities, sizeof(entity_state_t)*newp->max_entities);
} }
if (oldindex >= oldp->max_entities) if (oldindex >= oldp->max_entities)
Host_EndGame("Old packet entity too big\n"); Host_EndGame("Old packet entity too big\n");
@ -1404,7 +1406,7 @@ void CLQ1_AddShadow(entity_t *ent)
if (!r_shadows.value || !ent->model || ent->model->type != mod_alias) if (!r_shadows.value || !ent->model || ent->model->type != mod_alias)
return; return;
s = R_RegisterShader("shadowshader", s = R_RegisterShader("shadowshader",
"{\n" "{\n"
"polygonoffset\n" "polygonoffset\n"
"{\n" "{\n"
@ -1715,7 +1717,7 @@ static void CL_TransitionPacketEntities(packet_entities_t *newpack, packet_entit
//new this frame (or we noticed something changed significantly) //new this frame (or we noticed something changed significantly)
VectorCopy(snew->origin, le->origin); VectorCopy(snew->origin, le->origin);
VectorCopy(snew->angles, le->angles); VectorCopy(snew->angles, le->angles);
VectorCopy(snew->origin, le->oldorigin); VectorCopy(snew->origin, le->oldorigin);
VectorCopy(snew->angles, le->oldangle); VectorCopy(snew->angles, le->oldangle);
VectorCopy(snew->origin, le->neworigin); VectorCopy(snew->origin, le->neworigin);
@ -2223,7 +2225,9 @@ void CL_LinkPacketEntities (void)
if (model->flags & EF_ROCKET) if (model->flags & EF_ROCKET)
{ {
#ifdef _MSC_VER
#pragma message("Replace this flag on load for hexen2 models") #pragma message("Replace this flag on load for hexen2 models")
#endif
if (strncmp(model->name, "models/sflesh", 13)) if (strncmp(model->name, "models/sflesh", 13))
{ //hmm. hexen spider gibs... { //hmm. hexen spider gibs...
rad = 200; rad = 200;
@ -2370,7 +2374,7 @@ void CL_LinkProjectiles (void)
ent->shaderRGBAf[1] = 1; ent->shaderRGBAf[1] = 1;
ent->shaderRGBAf[2] = 1; ent->shaderRGBAf[2] = 1;
ent->shaderRGBAf[3] = 1; ent->shaderRGBAf[3] = 1;
VectorCopy (pr->origin, ent->origin); VectorCopy (pr->origin, ent->origin);
VectorCopy (pr->angles, ent->angles); VectorCopy (pr->angles, ent->angles);
@ -3053,7 +3057,7 @@ void CL_LinkPlayers (void)
} }
} }
else else
*/ */
if (pnum < cl.splitclients) if (pnum < cl.splitclients)
{ //this is a local player { //this is a local player

View file

@ -367,7 +367,9 @@ qboolean CL_EnqueDownload(char *filename, char *localname, unsigned int flags)
return true; return true;
} }
#ifdef _MSC_VER
#pragma message("fix this") #pragma message("fix this")
#endif
int downloadsize; int downloadsize;
void CL_GetDownloadSizes(unsigned int *filecount, unsigned int *totalsize, qboolean *somesizesunknown) 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); strcpy (cl.sound_name[numsounds], str);
#ifdef _MSC_VER
#pragma message("CLNQ_ParseServerData: no sound autodownloads") #pragma message("CLNQ_ParseServerData: no sound autodownloads")
#endif
//CL_CheckOrEnqueDownloadFile(str, NULL, 0); //CL_CheckOrEnqueDownloadFile(str, NULL, 0);
S_TouchSound (str); S_TouchSound (str);

View file

@ -1779,7 +1779,9 @@ qboolean SCR_ScreenShot (char *filename)
ext = COM_FileExtension(filename); ext = COM_FileExtension(filename);
buffer = VID_GetRGBInfo(MAX_PREPAD, &truewidth, &trueheight); 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") #pragma message("Need to ensure that the various image writing routines can cope with ((width|height)&3")
#endif
if (!buffer) if (!buffer)
return false; 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) static void NM_PrintColoured (int cx, int cy, int colour, qbyte *str)
{ {
#ifdef _MSC_VER
#pragma message("NM_PrintColoured: needs reimplementing") #pragma message("NM_PrintColoured: needs reimplementing")
#endif
/* /*
while (*str) 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) static void NM_PrintHighlighted (int cx, int cy, int colour, int bg, qbyte *str)
{ {
#ifdef _MSC_VER
#pragma message("NM_PrintHighlighted: needs reimplementing") #pragma message("NM_PrintHighlighted: needs reimplementing")
#endif
/* /*
while (*str) while (*str)
{ {
@ -153,7 +157,7 @@ qboolean M_IsFiltered(serverinfo_t *server) //figure out if we should filter a s
if (*sb_mapname.string) if (*sb_mapname.string)
if (!strstr(server->map, sb_mapname.string)) if (!strstr(server->map, sb_mapname.string))
return true; return true;
return false; return false;
} }
@ -178,9 +182,9 @@ void M_DrawOneServer (int inity)
char *o; char *o;
int l, i; int l, i;
char *s; char *s;
int miny=8*5; int miny=8*5;
int y=8*(5-selectedserver.linenum); int y=8*(5-selectedserver.linenum);
miny += inity; miny += inity;
y += inity; y += inity;
@ -261,7 +265,9 @@ int M_AddColumn (int right, int y, char *text, int maxchars, int colour, int hig
right = left; right = left;
#ifdef _MSC_VER
#pragma message("M_AddColumn: needs reimplementing") #pragma message("M_AddColumn: needs reimplementing")
#endif
/* /*
if (highlight >= 0) if (highlight >= 0)
{ {
@ -300,7 +306,7 @@ void M_DrawServerList(void)
char adr[MAX_ADR_SIZE]; char adr[MAX_ADR_SIZE];
CL_QueryServers(); CL_QueryServers();
slist_numoptions = 0; slist_numoptions = 0;
//find total servers. //find total servers.
@ -333,7 +339,7 @@ void M_DrawServerList(void)
return; return;
} }
if (slist_option >= slist_numoptions) if (slist_option >= slist_numoptions)
slist_option = slist_numoptions-1; slist_option = slist_numoptions-1;
op = vid.height/2/8; op = vid.height/2/8;
@ -609,7 +615,7 @@ void M_SListOptions_Key (int key)
slist_option = slist_numoptions-1; slist_option = slist_numoptions-1;
return; return;
} }
switch(options[slist_option].type) switch(options[slist_option].type)
{ {
default: default:
@ -764,7 +770,7 @@ void M_SListKey(int key)
M_SListOptions_Key(key); M_SListOptions_Key(key);
return; return;
} }
if (key == K_UPARROW) if (key == K_UPARROW)
{ {
slist_option--; slist_option--;
@ -872,7 +878,7 @@ void M_SListKey(int key)
} }
return; return;
} }
} }
@ -1073,7 +1079,7 @@ void SL_ServerDraw (int x, int y, menucustom_t *ths, menu_t *menu)
else if (selectedserver.inuse && NET_CompareAdr(si->adr, selectedserver.adr)) else if (selectedserver.inuse && NET_CompareAdr(si->adr, selectedserver.adr))
R2D_ImageColours(((sin(realtime*4.4)*0.25)+0.5) * 0.5, ((sin(realtime*4.4)*0.25)+0.5)*0.5, 0.08*0.5, 1.0); R2D_ImageColours(((sin(realtime*4.4)*0.25)+0.5) * 0.5, ((sin(realtime*4.4)*0.25)+0.5)*0.5, 0.08*0.5, 1.0);
else else
{ {
R2D_ImageColours( R2D_ImageColours(
serverbackcolor[(int)stype * 2 + (thisone & 1)][0], serverbackcolor[(int)stype * 2 + (thisone & 1)][0],
serverbackcolor[(int)stype * 2 + (thisone & 1)][1], serverbackcolor[(int)stype * 2 + (thisone & 1)][1],

View file

@ -591,7 +591,9 @@ void Master_AddMaster (char *address, int type, char *description)
return; return;
} }
#ifdef _MSC_VER
#pragma message("Master_AddMaster: add ipv6. don't care about tcp/irc.") #pragma message("Master_AddMaster: add ipv6. don't care about tcp/irc.")
#endif
if (adr.type != NA_IP && adr.type != NA_IPX) if (adr.type != NA_IP && adr.type != NA_IPX)
{ {
Con_Printf("Fixme: unable to poll address family for \"%s\"\n", address); 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; int ret;
struct sockaddr_qstorage addr; struct sockaddr_qstorage addr;
#ifdef _MSC_VER
#pragma message("NET_SendPollPacket: no support for ipv6") #pragma message("NET_SendPollPacket: no support for ipv6")
#endif
NetadrToSockadr (&to, &addr); NetadrToSockadr (&to, &addr);
#ifdef USEIPX #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) static void GL_DrawLineSparkParticle(int count, particle_t **plist, plooks_t *type)
{ {
#ifdef _MSC_VER
#pragma message("fixme: no line sparks") #pragma message("fixme: no line sparks")
#endif
#if 0 #if 0
particle_t *p; 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; *r = r_refdef.fov_y;
break; break;
#ifndef MINGW #ifdef _MSC_VER
#pragma message("fixme: AFOV not retrievable") #pragma message("fixme: AFOV not retrievable")
#endif #endif
case VF_AFOV: 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); 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)") #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)) if (!Mod_GetTag(mod, tagnum, &fstate, transforms))
{ {
memset(transforms, 0, sizeof(transforms)); memset(transforms, 0, sizeof(transforms));
@ -5022,7 +5024,7 @@ static struct {
{"argv_end_index", PF_argv_end_index, 516}, {"argv_end_index", PF_argv_end_index, 516},
{"buf_cvarlist", PF_buf_cvarlist, 517}, {"buf_cvarlist", PF_buf_cvarlist, 517},
{"cvar_description", PF_cvar_description, 518}, {"cvar_description", PF_cvar_description, 518},
{"gettime", PF_cs_gettime, 519}, {"gettime", PF_cs_gettime, 519},
{"keynumtostring", PF_cl_keynumtostring, 520}, {"keynumtostring", PF_cl_keynumtostring, 520},
@ -5763,7 +5765,9 @@ static void CSQC_GameCommand_f(void)
PR_ExecuteProgram (csqcprogs, csqcg.gamecommand); PR_ExecuteProgram (csqcprogs, csqcg.gamecommand);
} }
#ifdef _MSC_VER
#pragma message("do we really need the firstbyte parameter here?") #pragma message("do we really need the firstbyte parameter here?")
#endif
qboolean CSQC_ParseTempEntity(unsigned char firstbyte) qboolean CSQC_ParseTempEntity(unsigned char firstbyte)
{ {
void *pr_globals; void *pr_globals;

View file

@ -502,7 +502,7 @@ void QCBUILTIN PF_CL_drawsubpic (progfuncs_t *prinst, struct globalvars_s *pr_gl
void QCBUILTIN PF_CL_is_cached_pic (progfuncs_t *prinst, struct globalvars_s *pr_globals) void QCBUILTIN PF_CL_is_cached_pic (progfuncs_t *prinst, struct globalvars_s *pr_globals)
{ {
char *str; char *str;
str = PR_GetStringOfs(prinst, OFS_PARM0); str = PR_GetStringOfs(prinst, OFS_PARM0);
// if (Draw_IsCached) // if (Draw_IsCached)
@ -546,7 +546,7 @@ void QCBUILTIN PF_CL_precache_pic (progfuncs_t *prinst, struct globalvars_s *pr_
void QCBUILTIN PF_CL_free_pic (progfuncs_t *prinst, struct globalvars_s *pr_globals) void QCBUILTIN PF_CL_free_pic (progfuncs_t *prinst, struct globalvars_s *pr_globals)
{ {
char *str; char *str;
str = PR_GetStringOfs(prinst, OFS_PARM0); str = PR_GetStringOfs(prinst, OFS_PARM0);
//we don't support this. //we don't support this.
@ -779,7 +779,7 @@ void QCBUILTIN PF_parseentitydata(progfuncs_t *prinst, struct globalvars_s *pr_g
if (*file) if (*file)
Con_Printf("parseentitydata: too much data\n"); Con_Printf("parseentitydata: too much data\n");
} }
G_FLOAT(OFS_RETURN) = 0; G_FLOAT(OFS_RETURN) = 0;
} }
@ -825,7 +825,7 @@ static void QCBUILTIN PF_menu_cvar (progfuncs_t *prinst, struct globalvars_s *pr
{ {
cvar_t *var; cvar_t *var;
char *str; char *str;
str = PR_GetStringOfs(prinst, OFS_PARM0); str = PR_GetStringOfs(prinst, OFS_PARM0);
str = RemapCvarNameFromDPToFTE(str); str = RemapCvarNameFromDPToFTE(str);
var = Cvar_Get(str, "", 0, "menu cvars"); var = Cvar_Get(str, "", 0, "menu cvars");
@ -881,7 +881,7 @@ void QCBUILTIN PF_nonfatalobjerror (progfuncs_t *prinst, struct globalvars_s *pr
char *s; char *s;
struct edict_s *ed; struct edict_s *ed;
eval_t *selfp; eval_t *selfp;
s = PF_VarString(prinst, 0, pr_globals); s = PF_VarString(prinst, 0, pr_globals);
PR_StackTrace(prinst); PR_StackTrace(prinst);
@ -940,7 +940,7 @@ static void QCBUILTIN PF_Fixme (progfuncs_t *prinst, struct globalvars_s *pr_glo
void QCBUILTIN PF_CL_precache_sound (progfuncs_t *prinst, struct globalvars_s *pr_globals) void QCBUILTIN PF_CL_precache_sound (progfuncs_t *prinst, struct globalvars_s *pr_globals)
{ {
char *str; char *str;
str = PR_GetStringOfs(prinst, OFS_PARM0); str = PR_GetStringOfs(prinst, OFS_PARM0);
if (S_PrecacheSound(str)) if (S_PrecacheSound(str))
@ -1041,7 +1041,7 @@ void QCBUILTIN PF_cl_getmousepos (progfuncs_t *prinst, struct globalvars_s *pr_g
static void QCBUILTIN PF_Remove_ (progfuncs_t *prinst, struct globalvars_s *pr_globals) static void QCBUILTIN PF_Remove_ (progfuncs_t *prinst, struct globalvars_s *pr_globals)
{ {
menuedict_t *ed; menuedict_t *ed;
ed = (void*)G_EDICT(prinst, OFS_PARM0); ed = (void*)G_EDICT(prinst, OFS_PARM0);
if (ed->isfree) if (ed->isfree)
@ -1661,7 +1661,7 @@ builtin_t menu_builtins[] = {
PF_CL_drawcolouredstring, // #467 PF_CL_drawcolouredstring, // #467
PF_CL_stringwidth, // #468 PF_CL_stringwidth, // #468
PF_CL_drawsubpic, // #469 PF_CL_drawsubpic, // #469
//470 //470
skip1 // #470 skip1 // #470
PF_asin, // #471 PF_asin, // #471
@ -1954,7 +1954,9 @@ qboolean MP_Init (void)
if (mp_time) if (mp_time)
*mp_time = Sys_DoubleTime(); *mp_time = Sys_DoubleTime();
#ifdef _MSC_VER
#pragma message("disabled until csqc gets forked or some such") #pragma message("disabled until csqc gets forked or some such")
#endif
//mp_globs.drawfont = (float*)PR_FindGlobal(menuprogs, "drawfont", 0, NULL); //mp_globs.drawfont = (float*)PR_FindGlobal(menuprogs, "drawfont", 0, NULL);
//mp_globs.drawfontscale = (float*)PR_FindGlobal(menuprogs, "drawfontscale", 0, NULL); //mp_globs.drawfontscale = (float*)PR_FindGlobal(menuprogs, "drawfontscale", 0, NULL);

View file

@ -53,7 +53,7 @@ void R2D_CrosshairColor_Callback(struct cvar_s *var, char *oldvalue);
//We need this for minor things though, so we'll just use the slow accurate method. //We need this for minor things though, so we'll just use the slow accurate method.
//this is unlikly to be called too often. //this is unlikly to be called too often.
qbyte GetPaletteIndex(int red, int green, int blue) qbyte GetPaletteIndex(int red, int green, int blue)
{ {
//slow, horrible method. //slow, horrible method.
@ -103,7 +103,9 @@ void R2D_Init(void)
Font_Init(); Font_Init();
#ifdef _MSC_VER
#pragma message("Fixme: move conwidth handling into here") #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); 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; translate_texture = r_nulltex;
@ -141,7 +143,7 @@ void R2D_Init(void)
"blendfunc blend\n" "blendfunc blend\n"
"}\n" "}\n"
"}\n"); "}\n");
shader_brighten = R_RegisterShader("constrastshader", shader_brighten = R_RegisterShader("constrastshader",
"{\n" "{\n"
"{\n" "{\n"
"map $whiteimage\n" "map $whiteimage\n"
@ -446,7 +448,7 @@ void R2D_ConsoleBackground (int firstline, int lastline, qboolean forceopaque)
else else
{ {
if (!scr_conalpha.value) if (!scr_conalpha.value)
return; return;
a = scr_conalpha.value; a = scr_conalpha.value;
} }
@ -591,7 +593,7 @@ void R2D_Console_Resize(void)
char *s = strchr(vid_conautoscale.string, ' '); char *s = strchr(vid_conautoscale.string, ' ');
if (s) if (s)
yratio = atof(s + 1); yratio = atof(s + 1);
if (yratio <= 0) if (yratio <= 0)
yratio = xratio; yratio = xratio;
@ -985,7 +987,7 @@ void R2D_DrawCrosshair(void)
if (crosshair.ival < 1) if (crosshair.ival < 1)
return; return;
// old style // old style
if (crosshair.ival == 1 && !crosshairimage.string[0]) if (crosshair.ival == 1 && !crosshairimage.string[0])
{ {
for (sc = 0; sc < cl.splitclients; sc++) for (sc = 0; sc < cl.splitclients; sc++)

View file

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

View file

@ -8,7 +8,7 @@ of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details. See the GNU General Public License for more details.
@ -65,7 +65,7 @@ void S_TransferPaintBuffer(soundcardinfo_t *sc, int endtime)
skip = paintskip[sc->sn.numchannels-1]; skip = paintskip[sc->sn.numchannels-1];
cskip = chnskip[sc->sn.numchannels-1]; cskip = chnskip[sc->sn.numchannels-1];
count = (endtime - sc->paintedtime) * sc->sn.numchannels; count = (endtime - sc->paintedtime) * sc->sn.numchannels;
outlimit = sc->sn.samples; outlimit = sc->sn.samples;
startidx = out_idx = (sc->paintedtime * sc->sn.numchannels) % outlimit; startidx = out_idx = (sc->paintedtime * sc->sn.numchannels) % outlimit;
snd_vol = (volume.value*voicevolumemod)*256; snd_vol = (volume.value*voicevolumemod)*256;
@ -160,7 +160,7 @@ void S_PaintChannels(soundcardinfo_t *sc, int endtime)
continue; continue;
scache = S_LoadSound (ch->sfx); scache = S_LoadSound (ch->sfx);
if (!scache) if (!scache)
continue; continue;
if ((ch->pos>>PITCHSHIFT) > scache->length) //cache was flushed and gamedir changed. if ((ch->pos>>PITCHSHIFT) > scache->length) //cache was flushed and gamedir changed.
@ -181,8 +181,10 @@ void S_PaintChannels(soundcardinfo_t *sc, int endtime)
// start = ch->end - scache->length; // start = ch->end - scache->length;
// samples = end - start; // samples = end - start;
#ifdef _MSC_VER
#pragma message("pitch fix needed") #pragma message("pitch fix needed")
ch->sfx->decoder->decodemore(ch->sfx, #endif
ch->sfx->decoder->decodemore(ch->sfx,
end - (ch->end - scache->length) + 1); end - (ch->end - scache->length) + 1);
// ch->pos + end-ltime+1); // ch->pos + end-ltime+1);
@ -208,7 +210,7 @@ void S_PaintChannels(soundcardinfo_t *sc, int endtime)
if (count > 0) if (count > 0)
{ {
if (ch->pos < 0) //delay the sound a little if (ch->pos < 0) //delay the sound a little
{ {
if (count > -ch->pos) if (count > -ch->pos)
@ -219,14 +221,14 @@ void S_PaintChannels(soundcardinfo_t *sc, int endtime)
} }
if (scache->width == 1) if (scache->width == 1)
{ {
if (scache->numchannels==2) if (scache->numchannels==2)
SND_PaintChannelFrom8Stereo(ch, scache, count); SND_PaintChannelFrom8Stereo(ch, scache, count);
else if (sc->sn.numchannels == 6) else if (sc->sn.numchannels == 6)
SND_PaintChannelFrom8_6Speaker(ch, scache, count); SND_PaintChannelFrom8_6Speaker(ch, scache, count);
else if (sc->sn.numchannels == 4) else if (sc->sn.numchannels == 4)
SND_PaintChannelFrom8_4Speaker(ch, scache, count); SND_PaintChannelFrom8_4Speaker(ch, scache, count);
else else
SND_PaintChannelFrom8(ch, scache, count); SND_PaintChannelFrom8(ch, scache, count);
} }
else else
@ -264,18 +266,18 @@ void S_PaintChannels(soundcardinfo_t *sc, int endtime)
ch->end = ltime + ((scache->length)<<PITCHSHIFT)/ch->rate; ch->end = ltime + ((scache->length)<<PITCHSHIFT)/ch->rate;
} }
else else
{ // channel just stopped { // channel just stopped
s = ch->sfx; s = ch->sfx;
ch->sfx = NULL; ch->sfx = NULL;
if (s->decoder) if (s->decoder)
{ {
if (!S_IsPlayingSomewhere(s)) if (!S_IsPlayingSomewhere(s))
s->decoder->abort(s); s->decoder->abort(s);
} }
break; break;
} }
} }
} }
} }
// transfer out according to DMA format // transfer out according to DMA format
@ -329,7 +331,7 @@ void SND_PaintChannelFrom8Stereo (channel_t *ch, sfxcache_t *sc, int count)
ch->vol[0] = 255; ch->vol[0] = 255;
if (ch->vol[1] > 255) if (ch->vol[1] > 255)
ch->vol[1] = 255; ch->vol[1] = 255;
if (ch->rate != (1<<PITCHSHIFT)) if (ch->rate != (1<<PITCHSHIFT))
{ {
sfx = (signed char *)sc->data; sfx = (signed char *)sc->data;
@ -344,8 +346,8 @@ void SND_PaintChannelFrom8Stereo (channel_t *ch, sfxcache_t *sc, int count)
{ {
sfx = (signed char *)sc->data + (ch->pos>>PITCHSHIFT)*2; sfx = (signed char *)sc->data + (ch->pos>>PITCHSHIFT)*2;
for (i=0 ; i<count ; i++) for (i=0 ; i<count ; i++)
{ {
paintbuffer[i].s[0] += ch->vol[0] * sfx[(i<<1)]; paintbuffer[i].s[0] += ch->vol[0] * sfx[(i<<1)];
paintbuffer[i].s[1] += ch->vol[1] * sfx[(i<<1)+1]; paintbuffer[i].s[1] += ch->vol[1] * sfx[(i<<1)+1];
} }
ch->pos += count<<PITCHSHIFT; ch->pos += count<<PITCHSHIFT;
@ -432,12 +434,12 @@ void SND_PaintChannelFrom8_6Speaker (channel_t *ch, sfxcache_t *sc, int count)
{ {
sfx = (signed char *)sc->data + (ch->pos>>PITCHSHIFT); sfx = (signed char *)sc->data + (ch->pos>>PITCHSHIFT);
for (i=0 ; i<count ; i++) for (i=0 ; i<count ; i++)
{ {
paintbuffer[i].s[0] += ch->vol[0] * sfx[i]; paintbuffer[i].s[0] += ch->vol[0] * sfx[i];
paintbuffer[i].s[1] += ch->vol[1] * sfx[i]; paintbuffer[i].s[1] += ch->vol[1] * sfx[i];
paintbuffer[i].s[2] += ch->vol[2] * sfx[i]; paintbuffer[i].s[2] += ch->vol[2] * sfx[i];
paintbuffer[i].s[3] += ch->vol[3] * sfx[i]; paintbuffer[i].s[3] += ch->vol[3] * sfx[i];
paintbuffer[i].s[4] += ch->vol[4] * sfx[i]; paintbuffer[i].s[4] += ch->vol[4] * sfx[i];
paintbuffer[i].s[5] += ch->vol[5] * sfx[i]; paintbuffer[i].s[5] += ch->vol[5] * sfx[i];
} }
ch->pos += count<<PITCHSHIFT; ch->pos += count<<PITCHSHIFT;

View file

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

View file

@ -43,7 +43,7 @@ void *zlib_handle;
#endif #endif
#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 *qinflateEnd) OF((z_streamp strm)) ZSTATIC(inflateEnd);
static int (ZEXPORT *qinflate) OF((z_streamp strm, int flush)) ZSTATIC(inflate); static int (ZEXPORT *qinflate) OF((z_streamp strm, int flush)) ZSTATIC(inflate);

View file

@ -23,7 +23,9 @@ struct sockaddr;
#include "quakedef.h" #include "quakedef.h"
#include "netinc.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.") #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_local_cl_ipadr; //still used to match local ui requests, and to generate ip reports for q3 servers.
netadr_t net_from; netadr_t net_from;

View file

@ -8,7 +8,7 @@ of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details. See the GNU General Public License for more details.
@ -123,7 +123,7 @@ struct world_s
int *global_self; int *global_self;
unsigned int max_edicts; //limiting factor... 1024 fields*4*MAX_EDICTS == a heck of a lot. unsigned int max_edicts; //limiting factor... 1024 fields*4*MAX_EDICTS == a heck of a lot.
unsigned int num_edicts; // increases towards MAX_EDICTS 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. wedict_t *edicts; // can NOT be array indexed.
struct progfuncs_s *progs; struct progfuncs_s *progs;
qboolean usesolidcorpse; 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_TOPCOLOR:
case RGB_GEN_BOTTOMCOLOR: case RGB_GEN_BOTTOMCOLOR:
#ifdef _MSC_VER
#pragma message("fix 24bit player colours") #pragma message("fix 24bit player colours")
#endif
block = D3DCOLOR_RGBA(255, 255, 255, 255); block = D3DCOLOR_RGBA(255, 255, 255, 255);
while((cnt)--) while((cnt)--)
{ {

View file

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

View file

@ -513,7 +513,7 @@ void GL_SetShaderState2D(qboolean is2d)
BE_SelectMode(BEM_STANDARD); BE_SelectMode(BEM_STANDARD);
} }
void GL_SelectTexture(int target) void GL_SelectTexture(int target)
{ {
shaderstate.currenttmu = target; shaderstate.currenttmu = target;
if (qglActiveTextureARB) if (qglActiveTextureARB)
@ -1068,15 +1068,15 @@ void GLBE_Init(void)
t = (double)i / (double)FTABLE_SIZE; t = (double)i / (double)FTABLE_SIZE;
r_sintable[i] = sin(t * 2*M_PI); r_sintable[i] = sin(t * 2*M_PI);
if (t < 0.25) if (t < 0.25)
r_triangletable[i] = t * 4.0; r_triangletable[i] = t * 4.0;
else if (t < 0.75) else if (t < 0.75)
r_triangletable[i] = 2 - 4.0 * t; r_triangletable[i] = 2 - 4.0 * t;
else else
r_triangletable[i] = (t - 0.75) * 4.0 - 1.0; r_triangletable[i] = (t - 0.75) * 4.0 - 1.0;
if (t < 0.5) if (t < 0.5)
r_squaretable[i] = 1.0f; r_squaretable[i] = 1.0f;
else else
r_squaretable[i] = -1.0f; r_squaretable[i] = -1.0f;
@ -1096,7 +1096,7 @@ void GLBE_Init(void)
shaderstate.shaderbits = ~0; shaderstate.shaderbits = ~0;
BE_SendPassBlendDepthMask(0); BE_SendPassBlendDepthMask(0);
if (qglEnableClientState) if (qglEnableClientState)
qglEnableClientState(GL_VERTEX_ARRAY); qglEnableClientState(GL_VERTEX_ARRAY);
@ -1115,7 +1115,7 @@ static vecV_t vertexarray[MAX_ARRAY_VERTS];
/*========================================== texture coord generation =====================================*/ /*========================================== texture coord generation =====================================*/
static void tcgen_environment(float *st, unsigned int numverts, float *xyz, float *normal) static void tcgen_environment(float *st, unsigned int numverts, float *xyz, float *normal)
{ {
int i; int i;
vec3_t viewer, reflected; vec3_t viewer, reflected;
@ -1126,7 +1126,7 @@ static void tcgen_environment(float *st, unsigned int numverts, float *xyz, floa
RotateLightVector(shaderstate.curentity->axis, shaderstate.curentity->origin, r_origin, rorg); RotateLightVector(shaderstate.curentity->axis, shaderstate.curentity->origin, r_origin, rorg);
for (i = 0 ; i < numverts ; i++, xyz += sizeof(vecV_t)/sizeof(vec_t), normal += 3, st += 2 ) for (i = 0 ; i < numverts ; i++, xyz += sizeof(vecV_t)/sizeof(vec_t), normal += 3, st += 2 )
{ {
VectorSubtract (rorg, xyz, viewer); VectorSubtract (rorg, xyz, viewer);
VectorNormalizeFast (viewer); VectorNormalizeFast (viewer);
@ -1157,7 +1157,7 @@ static void tcgen_fog(float *st, unsigned int numverts, float *xyz)
Vector4Scale(zmat, shaderstate.fogfar, zmat); Vector4Scale(zmat, shaderstate.fogfar, zmat);
for (i = 0 ; i < numverts ; i++, xyz += sizeof(vecV_t)/sizeof(vec_t), st += 2 ) for (i = 0 ; i < numverts ; i++, xyz += sizeof(vecV_t)/sizeof(vec_t), st += 2 )
{ {
z = DotProduct(xyz, zmat) + zmat[3]; z = DotProduct(xyz, zmat) + zmat[3];
st[0] = z; st[0] = z;
@ -1202,7 +1202,7 @@ static float *tcgen(unsigned int tcgen, int cnt, float *dst, const mesh_t *mesh)
{ {
static vec3_t tc_gen_s = { 1.0f, 0.0f, 0.0f }; static vec3_t tc_gen_s = { 1.0f, 0.0f, 0.0f };
static vec3_t tc_gen_t = { 0.0f, 1.0f, 0.0f }; static vec3_t tc_gen_t = { 0.0f, 1.0f, 0.0f };
dst[0] = DotProduct(tc_gen_s, src[i]); dst[0] = DotProduct(tc_gen_s, src[i]);
dst[1] = DotProduct(tc_gen_t, src[i]); dst[1] = DotProduct(tc_gen_t, src[i]);
} }
@ -1255,7 +1255,7 @@ static void tcmod(const tcmod_t *tcmod, int cnt, const float *src, float *dst, c
dst[1] = src[1] + R_FastSin (src[1]*t2+t1) * t2; dst[1] = src[1] + R_FastSin (src[1]*t2+t1) * t2;
} }
break; break;
case SHADER_TCMOD_STRETCH: case SHADER_TCMOD_STRETCH:
table = FTableForFunc(tcmod->args[0]); table = FTableForFunc(tcmod->args[0]);
t2 = tcmod->args[3] + shaderstate.curtime * tcmod->args[4]; t2 = tcmod->args[3] + shaderstate.curtime * tcmod->args[4];
@ -1268,7 +1268,7 @@ static void tcmod(const tcmod_t *tcmod, int cnt, const float *src, float *dst, c
dst[1] = src[1] * t1 + t2; dst[1] = src[1] * t1 + t2;
} }
break; break;
case SHADER_TCMOD_SCROLL: case SHADER_TCMOD_SCROLL:
t1 = tcmod->args[0] * shaderstate.curtime; t1 = tcmod->args[0] * shaderstate.curtime;
t2 = tcmod->args[1] * shaderstate.curtime; t2 = tcmod->args[1] * shaderstate.curtime;
@ -1279,7 +1279,7 @@ static void tcmod(const tcmod_t *tcmod, int cnt, const float *src, float *dst, c
dst[1] = src[1] + t2; dst[1] = src[1] + t2;
} }
break; break;
case SHADER_TCMOD_TRANSFORM: case SHADER_TCMOD_TRANSFORM:
for (j = 0; j < cnt; j++, dst+=2, src+=2) for (j = 0; j < cnt; j++, dst+=2, src+=2)
{ {
@ -1645,7 +1645,7 @@ static void deformgen(const deformv_t *deformv, int cnt, vecV_t *src, vecV_t *ds
for (j = 2; j >= 0; j--) for (j = 2; j >= 0; j--)
{ {
quad[3] = (float *)(dst + mesh->indexes[k+3+j]); quad[3] = (float *)(dst + mesh->indexes[k+3+j]);
if (!VectorEquals (quad[3], quad[0]) && if (!VectorEquals (quad[3], quad[0]) &&
!VectorEquals (quad[3], quad[1]) && !VectorEquals (quad[3], quad[1]) &&
!VectorEquals (quad[3], quad[2])) !VectorEquals (quad[3], quad[2]))
{ {
@ -1863,7 +1863,7 @@ static void alphagen(const shaderpass_t *pass, int cnt, avec4_t *const src, avec
case ALPHA_GEN_SPECULAR: case ALPHA_GEN_SPECULAR:
{ {
mat3_t axis; mat3_t axis;
AngleVectors(shaderstate.curentity->angles, axis[0], axis[1], axis[2]); AngleVectors(shaderstate.curentity->angles, axis[0], axis[1], axis[2]);
VectorSubtract(r_origin, shaderstate.curentity->origin, v1); VectorSubtract(r_origin, shaderstate.curentity->origin, v1);
@ -1907,7 +1907,7 @@ static void GenerateColourMods(const shaderpass_t *pass)
if (pass->flags & SHADER_PASS_NOCOLORARRAY) if (pass->flags & SHADER_PASS_NOCOLORARRAY)
{ {
avec4_t scol; avec4_t scol;
colourgen(pass, 1, meshlist->colors4f_array, &scol, meshlist); colourgen(pass, 1, meshlist->colors4f_array, &scol, meshlist);
alphagen(pass, 1, meshlist->colors4f_array, &scol, meshlist); alphagen(pass, 1, meshlist->colors4f_array, &scol, meshlist);
qglDisableClientState(GL_COLOR_ARRAY); qglDisableClientState(GL_COLOR_ARRAY);
@ -2032,7 +2032,9 @@ static void BE_SendPassBlendDepthMask(unsigned int sbits)
unsigned int delta; unsigned int delta;
/*2d mode doesn't depth test or depth write*/ /*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?") #pragma message("fixme: q3 doesn't seem to have this, why do we need it?")
#endif
if (shaderstate.force2d) if (shaderstate.force2d)
{ {
sbits &= ~(SBITS_MISC_DEPTHWRITE|SBITS_MISC_DEPTHEQUALONLY); 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: case SP_EYEPOS:
{ {
float m16[16]; float m16[16];
#ifdef _MSC_VER
#pragma message("is this correct?") #pragma message("is this correct?")
#endif
// vec3_t t1; // vec3_t t1;
vec3_t t2; vec3_t t2;
Matrix4_ModelMatrixFromAxis(m16, shaderstate.curentity->axis[0], shaderstate.curentity->axis[1], shaderstate.curentity->axis[2], shaderstate.curentity->origin); 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; break;
case SP_LIGHTPOSITION: case SP_LIGHTPOSITION:
{ {
#ifdef _MSC_VER
#pragma message("is this correct?") #pragma message("is this correct?")
#endif
float inv[16]; float inv[16];
float m16[16]; float m16[16];
// vec3_t t1; // vec3_t t1;
@ -2655,8 +2661,8 @@ void GLBE_SelectMode(backendmode_t mode)
//we don't write or blend anything (maybe alpha test... but mneh) //we don't write or blend anything (maybe alpha test... but mneh)
BE_SendPassBlendDepthMask(SBITS_MISC_DEPTHCLOSERONLY | SBITS_MASK_BITS); BE_SendPassBlendDepthMask(SBITS_MISC_DEPTHCLOSERONLY | SBITS_MASK_BITS);
//don't change cull stuff, and //don't change cull stuff, and
//don't actually change stencil stuff - caller needs to be //don't actually change stencil stuff - caller needs to be
//aware of how many times stuff is drawn, so they can do that themselves. //aware of how many times stuff is drawn, so they can do that themselves.
} }
#endif #endif
@ -2911,7 +2917,9 @@ static void DrawMeshes(void)
#endif #endif
case BEM_DEPTHONLY: case BEM_DEPTHONLY:
GL_DeSelectProgram(); GL_DeSelectProgram();
#ifdef _MSC_VER
#pragma message("fixme: support alpha test") #pragma message("fixme: support alpha test")
#endif
GL_ApplyVertexPointer(); GL_ApplyVertexPointer();
BE_SubmitMeshChain(); BE_SubmitMeshChain();
break; break;
@ -3219,17 +3227,17 @@ static void BE_UpdateLightmaps(void)
switch (lightmap_bytes) switch (lightmap_bytes)
{ {
case 4: case 4:
qglTexSubImage2D(GL_TEXTURE_2D, 0, 0, theRect->t, qglTexSubImage2D(GL_TEXTURE_2D, 0, 0, theRect->t,
LMBLOCK_WIDTH, theRect->h, (lightmap_bgra?GL_BGRA_EXT:GL_RGBA), GL_UNSIGNED_INT_8_8_8_8_REV, LMBLOCK_WIDTH, theRect->h, (lightmap_bgra?GL_BGRA_EXT:GL_RGBA), GL_UNSIGNED_INT_8_8_8_8_REV,
lightmap[lm]->lightmaps+(theRect->t) *LMBLOCK_WIDTH*4); lightmap[lm]->lightmaps+(theRect->t) *LMBLOCK_WIDTH*4);
break; break;
case 3: case 3:
qglTexSubImage2D(GL_TEXTURE_2D, 0, 0, theRect->t, qglTexSubImage2D(GL_TEXTURE_2D, 0, 0, theRect->t,
LMBLOCK_WIDTH, theRect->h, (lightmap_bgra?GL_BGR_EXT:GL_RGB), GL_UNSIGNED_BYTE, LMBLOCK_WIDTH, theRect->h, (lightmap_bgra?GL_BGR_EXT:GL_RGB), GL_UNSIGNED_BYTE,
lightmap[lm]->lightmaps+(theRect->t) *LMBLOCK_WIDTH*3); lightmap[lm]->lightmaps+(theRect->t) *LMBLOCK_WIDTH*3);
break; break;
case 1: case 1:
qglTexSubImage2D(GL_TEXTURE_2D, 0, 0, theRect->t, qglTexSubImage2D(GL_TEXTURE_2D, 0, 0, theRect->t,
LMBLOCK_WIDTH, theRect->h, GL_LUMINANCE, GL_UNSIGNED_BYTE, LMBLOCK_WIDTH, theRect->h, GL_LUMINANCE, GL_UNSIGNED_BYTE,
lightmap[lm]->lightmaps+(theRect->t) *LMBLOCK_WIDTH); lightmap[lm]->lightmaps+(theRect->t) *LMBLOCK_WIDTH);
break; break;
@ -3245,7 +3253,7 @@ static void BE_UpdateLightmaps(void)
lightmap[lm]->deluxmodified = false; lightmap[lm]->deluxmodified = false;
theRect = &lightmap[lm]->deluxrectchange; theRect = &lightmap[lm]->deluxrectchange;
GL_MTBind(0, GL_TEXTURE_2D, deluxmap_textures[lm]); GL_MTBind(0, GL_TEXTURE_2D, deluxmap_textures[lm]);
qglTexSubImage2D(GL_TEXTURE_2D, 0, 0, theRect->t, qglTexSubImage2D(GL_TEXTURE_2D, 0, 0, theRect->t,
LMBLOCK_WIDTH, theRect->h, GL_RGB, GL_UNSIGNED_BYTE, LMBLOCK_WIDTH, theRect->h, GL_RGB, GL_UNSIGNED_BYTE,
lightmap[lm]->deluxmaps+(theRect->t) *LMBLOCK_WIDTH*3); lightmap[lm]->deluxmaps+(theRect->t) *LMBLOCK_WIDTH*3);
theRect->l = LMBLOCK_WIDTH; theRect->l = LMBLOCK_WIDTH;

View file

@ -506,7 +506,9 @@ void R_BloomBlend (void)
return; return;
PPL_RevertToKnownState(); PPL_RevertToKnownState();
#ifdef _MSC_VER
#pragma message("Note: Bloom doesn't use the backend.") #pragma message("Note: Bloom doesn't use the backend.")
#endif
//set up full screen workspace //set up full screen workspace
qglViewport(0, 0, vid.pixelwidth, vid.pixelheight); 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); 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") #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; int vwidth = 1, vheight = 1;
float vs, vt, cs, ct; float vs, vt, cs, ct;
#ifdef _MSC_VER
#pragma message("backend fixme") #pragma message("backend fixme")
#endif
Con_Printf("motionblur is not updated for the backend\n"); Con_Printf("motionblur is not updated for the backend\n");
if (gl_config.arb_texture_non_power_of_two) if (gl_config.arb_texture_non_power_of_two)

View file

@ -2769,7 +2769,9 @@ void Shader_SetBlendmode (shaderpass_t *pass)
} }
else else
{ {
#ifdef _MSC_VER
#pragma message("is this correct?") #pragma message("is this correct?")
#endif
pass->shaderbits &= ~SBITS_BLEND_BITS; pass->shaderbits &= ~SBITS_BLEND_BITS;
pass->shaderbits |= SBITS_SRCBLEND_ONE; pass->shaderbits |= SBITS_SRCBLEND_ONE;
pass->shaderbits |= SBITS_DSTBLEND_ZERO; 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)) if ((shader->flags & SHADER_SKY) && (shader->flags & SHADER_DEPTHWRITE))
{ {
#ifdef _MSC_VER
#pragma message("is this valid?") #pragma message("is this valid?")
#endif
pass->shaderbits &= ~SBITS_MISC_DEPTHWRITE; 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 #define PROJECTION_DISTANCE (float)(dl->radius*2)//0x7fffffff
/*Fixme: this is brute forced*/ /*Fixme: this is brute forced*/
#ifdef _MSC_VER
#pragma message("brush shadows are bruteforced") #pragma message("brush shadows are bruteforced")
#endif
static void Sh_DrawBrushModelShadow(dlight_t *dl, entity_t *e) static void Sh_DrawBrushModelShadow(dlight_t *dl, entity_t *e)
{ {
int v; int v;

View file

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

View file

@ -60,7 +60,7 @@ static void decide(enum protocol_type *types, unsigned int numtypes, qboolean (*
static void pp_flush(multicast_t to, vec3_t origin, void (*flushfunc)(client_t *cl, sizebuf_t *msg, enum protocol_type *pt, union protocol_data *pd), enum protocol_type *pt, union protocol_data *pd) static void pp_flush(multicast_t to, vec3_t origin, void (*flushfunc)(client_t *cl, sizebuf_t *msg, enum protocol_type *pt, union protocol_data *pd), enum protocol_type *pt, union protocol_data *pd)
{ {
client_t *client; client_t *client;
qbyte *mask; qbyte *mask;
int leafnum; int leafnum;
@ -150,7 +150,7 @@ inrange:
/* /*
if (sv.mvdrecording && !with) //mvds don't get the pext stuff if (sv.mvdrecording && !with) //mvds don't get the pext stuff
{ {
flushfunc(&dem.recorder, flushfunc(&dem.recorder,
if (reliable) if (reliable)
{ {
MVDWrite_Begin(dem_all, 0, sv.multicast.cursize); MVDWrite_Begin(dem_all, 0, sv.multicast.cursize);
@ -836,7 +836,7 @@ void NPP_NQWriteByte(int dest, qbyte data) //replacement write func (nq to qw)
NPP_NQCheckDest(dest); NPP_NQCheckDest(dest);
#ifdef NQPROT #ifdef NQPROT
if (dest == MSG_ONE) if (dest == MSG_ONE)
{ {
client_t *cl = Write_GetClient(); client_t *cl = Write_GetClient();
if (!cl) if (!cl)
@ -951,7 +951,9 @@ void NPP_NQWriteByte(int dest, qbyte data) //replacement write func (nq to qw)
protocollen++; protocollen++;
if (data & DPSND_LARGESOUND) if (data & DPSND_LARGESOUND)
protocollen++; protocollen++;
#ifdef _MSC_VER
#pragma message("NPP_NQWriteByte: this ignores SVC_SOUND from nq mods (nexuiz)") #pragma message("NPP_NQWriteByte: this ignores SVC_SOUND from nq mods (nexuiz)")
#endif
ignoreprotocol = true; ignoreprotocol = true;
break; break;
case svc_temp_entity: case svc_temp_entity:
@ -1673,7 +1675,7 @@ void NPP_QWWriteByte(int dest, qbyte data) //replacement write func (nq to qw)
return; return;
} }
} }
} }
else else
MSG_WriteByte (QWWriteDest(dest), data); MSG_WriteByte (QWWriteDest(dest), data);
#endif #endif

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) static void QCBUILTIN PF_sv_particleeffectnum(progfuncs_t *prinst, struct globalvars_s *pr_globals)
{ {
#ifdef PEXT_CSQC #ifdef PEXT_CSQC
#ifdef _MSC_VER
#pragma message("PF_sv_particleeffectnum: which effect index values to use?") #pragma message("PF_sv_particleeffectnum: which effect index values to use?")
#endif
char *efname = PR_GetStringOfs(prinst, OFS_PARM0); char *efname = PR_GetStringOfs(prinst, OFS_PARM0);
G_FLOAT(OFS_RETURN) = COM_Effectinfo_ForName(efname); G_FLOAT(OFS_RETURN) = COM_Effectinfo_ForName(efname);
#else #else
@ -8208,7 +8210,9 @@ static void QCBUILTIN PF_sv_gettaginfo(progfuncs_t *prinst, struct globalvars_s
if (ent->xv->tag_entity) if (ent->xv->tag_entity)
{ {
#ifdef _MSC_VER
#pragma message("PF_sv_gettaginfo: This function doesn't honour attachments") #pragma message("PF_sv_gettaginfo: This function doesn't honour attachments")
#endif
Con_Printf("PF_sv_gettaginfo doesn't support attachments\n"); Con_Printf("PF_sv_gettaginfo doesn't support attachments\n");
} }
@ -9048,7 +9052,7 @@ BuiltinList_t BuiltinList[] = { //nq qw h2 ebfs
{"clientstat", PF_clientstat, 0, 0, 0, 232}, //EXT_CSQC {"clientstat", PF_clientstat, 0, 0, 0, 232}, //EXT_CSQC
{"globalstat", PF_globalstat, 0, 0, 0, 233}, //EXT_CSQC_1 actually {"globalstat", PF_globalstat, 0, 0, 0, 233}, //EXT_CSQC_1 actually
//END EXT_CSQC //END EXT_CSQC
{"isbackbuffered", PF_isbackbuffered, 0, 0, 0, 234}, {"isbackbuffered", PF_isbackbuffered, 0, 0, 0, 234},
//{"rotatevectorsbyangle", PF_rotatevectorsbyangles,0,0,0, 235}, // #235 //{"rotatevectorsbyangle", PF_rotatevectorsbyangles,0,0,0, 235}, // #235
//{"rotatevectorsbymatrix", PF_rotatevectorsbymatrix,0,0,0, 236}, // #236 //{"rotatevectorsbymatrix", PF_rotatevectorsbymatrix,0,0,0, 236}, // #236
{"skinforname", PF_skinforname, 0, 0, 0, 237}, // #237 {"skinforname", PF_skinforname, 0, 0, 0, 237}, // #237

View file

@ -553,7 +553,9 @@ void SV_DropClient (client_t *drop)
if (drop->netchan.remote_address.type == NA_LOOPBACK) if (drop->netchan.remote_address.type == NA_LOOPBACK)
{ {
Netchan_Transmit(&drop->netchan, 0, "", SV_RateForClient(drop)); 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.") #pragma message("This mans that we may not see the reason we kicked ourselves.")
#endif
CL_Disconnect(); CL_Disconnect();
drop->state = cs_free; //don't do zombie stuff 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_WriteByte (buf, i);
MSG_WriteFloat (buf, realtime - client->connection_started); MSG_WriteFloat (buf, realtime - client->connection_started);
#ifdef _MSC_VER
#pragma message("this is a bug: it can be broadcast to all qw clients") #pragma message("this is a bug: it can be broadcast to all qw clients")
#endif
if (ftepext & PEXT_BIGUSERINFOS) if (ftepext & PEXT_BIGUSERINFOS)
Q_strncpyz (info, client->userinfo, sizeof(info)); Q_strncpyz (info, client->userinfo, sizeof(info));
else else
@ -1053,9 +1057,9 @@ void SVC_Status (void)
if (slots>12) if (slots>12)
Con_Printf ("5013 23 64 94 \"DeathBunny\" \"soldier\" 13 13\n"); Con_Printf ("5013 23 64 94 \"DeathBunny\" \"soldier\" 13 13\n");
if (slots>10) 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) 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 (); SV_EndRedirect ();
} }
@ -1694,7 +1698,7 @@ client_t *SVC_DirectConnect(void)
s = Info_ValueForKey(userinfo[0], "qport"); s = Info_ValueForKey(userinfo[0], "qport");
qport = atoi(s); qport = atoi(s);
s = Info_ValueForKey(userinfo[0], "name"); s = Info_ValueForKey(userinfo[0], "name");
if (!*s) if (!*s)
Info_SetValueForKey(userinfo[0], "name", "UnnamedQ3", sizeof(userinfo[0])); Info_SetValueForKey(userinfo[0], "name", "UnnamedQ3", sizeof(userinfo[0]));
@ -3061,14 +3065,14 @@ qboolean SV_ReadPackets (void)
cl->laggedpacket = lp->next; cl->laggedpacket = lp->next;
if (cl->laggedpacket_last == lp) if (cl->laggedpacket_last == lp)
cl->laggedpacket_last = lp->next; cl->laggedpacket_last = lp->next;
lp->next = svs.free_lagged_packet; lp->next = svs.free_lagged_packet;
svs.free_lagged_packet = lp; svs.free_lagged_packet = lp;
SZ_Clear(&net_message); SZ_Clear(&net_message);
memcpy(net_message.data, lp->data, lp->length); memcpy(net_message.data, lp->data, lp->length);
net_message.cursize = lp->length; net_message.cursize = lp->length;
net_from = cl->netchan.remote_address; //not sure if anything depends on this, but lets not screw them up willynilly net_from = cl->netchan.remote_address; //not sure if anything depends on this, but lets not screw them up willynilly
if (Netchan_Process(&cl->netchan)) if (Netchan_Process(&cl->netchan))
@ -3155,7 +3159,9 @@ qboolean SV_ReadPackets (void)
#ifdef Q3SERVER #ifdef Q3SERVER
if (ISQ3CLIENT(cl)) if (ISQ3CLIENT(cl))
{ {
#ifdef _MSC_VER
#pragma message("qwoverq3: fixme: this will block qw+q3 clients from the same ip") #pragma message("qwoverq3: fixme: this will block qw+q3 clients from the same ip")
#endif
if (cl->state != cs_zombie) if (cl->state != cs_zombie)
{ {
received++; received++;
@ -3198,7 +3204,7 @@ qboolean SV_ReadPackets (void)
cl->laggedpacket_last->length = net_message.cursize; cl->laggedpacket_last->length = net_message.cursize;
break; break;
} }
if (Netchan_Process(&cl->netchan)) if (Netchan_Process(&cl->netchan))
{ // this is a valid, sequenced packet, so process it { // this is a valid, sequenced packet, so process it
@ -4658,16 +4664,16 @@ void SV_Init (quakeparms_t *parms)
Cbuf_AddText("startmap_sp", RESTRICT_LOCAL); //DP extension Cbuf_AddText("startmap_sp", RESTRICT_LOCAL); //DP extension
Cbuf_Execute(); Cbuf_Execute();
} }
if (sv.state == ss_dead && COM_FCheckExists("maps/start.bsp")) if (sv.state == ss_dead && COM_FCheckExists("maps/start.bsp"))
Cmd_ExecuteString ("map start", RESTRICT_LOCAL); //regular q1 Cmd_ExecuteString ("map start", RESTRICT_LOCAL); //regular q1
if (sv.state == ss_dead && COM_FCheckExists("maps/demo1.bsp")) if (sv.state == ss_dead && COM_FCheckExists("maps/demo1.bsp"))
Cmd_ExecuteString ("map demo1", RESTRICT_LOCAL); //regular h2 sp Cmd_ExecuteString ("map demo1", RESTRICT_LOCAL); //regular h2 sp
#ifdef Q2SERVER #ifdef Q2SERVER
if (sv.state == ss_dead && COM_FCheckExists("maps/base1.bsp")) if (sv.state == ss_dead && COM_FCheckExists("maps/base1.bsp"))
Cmd_ExecuteString ("map base1", RESTRICT_LOCAL); //regular q2 sp Cmd_ExecuteString ("map base1", RESTRICT_LOCAL); //regular q2 sp
#endif #endif
#ifdef Q3SERVER #ifdef Q3SERVER
if (sv.state == ss_dead && COM_FCheckExists("maps/q3dm1.bsp")) if (sv.state == ss_dead && COM_FCheckExists("maps/q3dm1.bsp"))
Cmd_ExecuteString ("map q3dm1", RESTRICT_LOCAL); //regular q3 'sp' Cmd_ExecuteString ("map q3dm1", RESTRICT_LOCAL); //regular q3 'sp'
#endif #endif
#ifdef HLSERVER #ifdef HLSERVER

View file

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

View file

@ -5907,7 +5907,9 @@ void SV_ExecuteClientMessage (client_t *cl)
if (temp1.ival) if (temp1.ival)
frame = &cl->frameunion.frames[(cl->netchan.incoming_acknowledged+temp1.ival) & UPDATE_MASK]; 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") #pragma message("FIXME: make antilag optionally support non-player ents too")
#endif
for (i = 0; i < sv.allocated_client_slots; i++) for (i = 0; i < sv.allocated_client_slots; i++)
{ {
cl->laggedents[i].present = frame->playerpresent[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)); memset(&state, 0, sizeof(state));
#ifdef _MSC_VER
#pragma message("qwoverq3: other things will need to be packed into here.") #pragma message("qwoverq3: other things will need to be packed into here.")
#endif
state.commandTime = client->lastcmd.servertime; 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) void SVQ3Q1_ConvertEntStateQ1ToQ3(entity_state_t *q1, q3entityState_t *q3)
{ {
#ifdef _MSC_VER
#pragma message("qwoverq3: This _WILL_ need extending") #pragma message("qwoverq3: This _WILL_ need extending")
#endif
q3->number = q1->number; q3->number = q1->number;
q3->pos.trTime = 0; q3->pos.trTime = 0;
@ -2864,7 +2868,9 @@ void SVQ3_ParseUsercmd(client_t *client, qboolean delta)
{ {
usercmd_t temp; usercmd_t temp;
temp = client->lastcmd; temp = client->lastcmd;
#ifdef _MSC_VER
#pragma message("qwoverq3: you need to be aware of this if you're making a compatible cgame") #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). //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. //so we map full to full here.
temp.sidemove *= client->maxspeed/127.0f; temp.sidemove *= client->maxspeed/127.0f;