============================================================================
*/
-#if !defined(ENDIAN_LITTLE) && !defined(ENDIAN_BIG)
-short (*BigShort) (short l);
-short (*LittleShort) (short l);
-int (*BigLong) (int l);
-int (*LittleLong) (int l);
-float (*BigFloat) (float l);
-float (*LittleFloat) (float l);
-#endif
-
short ShortSwap (short l)
{
qbyte b1,b2;
return (b1<<8) + b2;
}
-#if !defined(ENDIAN_LITTLE) && !defined(ENDIAN_BIG)
-short ShortNoSwap (short l)
-{
- return l;
-}
-#endif
-
int LongSwap (int l)
{
qbyte b1,b2,b3,b4;
return ((int)b1<<24) + ((int)b2<<16) + ((int)b3<<8) + b4;
}
-#if !defined(ENDIAN_LITTLE) && !defined(ENDIAN_BIG)
-int LongNoSwap (int l)
-{
- return l;
-}
-#endif
-
float FloatSwap (float f)
{
union
return dat2.f;
}
-#if !defined(ENDIAN_LITTLE) && !defined(ENDIAN_BIG)
-float FloatNoSwap (float f)
-{
- return f;
-}
-#endif
-
// Extract integers from buffers
return l;
}
-// used by server (always latest PROTOCOL_DARKPLACES)
-float MSG_ReadDPCoord (void)
-{
- return (signed short) MSG_ReadLittleShort();
-}
-
// used by client
float MSG_ReadCoord (void)
{
- if (cl.protocol == PROTOCOL_DARKPLACES2 || cl.protocol == PROTOCOL_DARKPLACES3 || cl.protocol == PROTOCOL_DARKPLACES4)
+ if (cl.protocol == PROTOCOL_DARKPLACES2 || cl.protocol == PROTOCOL_DARKPLACES3 || cl.protocol == PROTOCOL_DARKPLACES4 || cl.protocol == PROTOCOL_DARKPLACES5)
return (signed short) MSG_ReadLittleShort();
else if (cl.protocol == PROTOCOL_DARKPLACES1)
return MSG_ReadLittleFloat();
Host_Error ("SZ_GetSpace: %i is > full buffer size\n", length);
buf->overflowed = true;
- Con_Printf ("SZ_GetSpace: overflow\n");
+ Con_Print("SZ_GetSpace: overflow\n");
SZ_Clear (buf);
}
if (cur >= flushpointer || i >= size)
{
*cur++ = 0;
- Con_Printf("%s", text);
+ Con_Print(text);
cur = text;
}
}
if (!FS_FileExists("gfx/pop.lmp"))
{
if (fs_modified)
- Con_Printf ("Playing shareware version, with modification.\nwarning: most mods require full quake data.\n");
+ Con_Print("Playing shareware version, with modification.\nwarning: most mods require full quake data.\n");
else
- Con_Printf ("Playing shareware version.\n");
+ Con_Print("Playing shareware version.\n");
return;
}
Cvar_Set ("registered", "1");
- Con_Printf ("Playing registered version.\n");
+ Con_Print("Playing registered version.\n");
}
gamemode = GAME_SETHERAL;
else if (strstr(name, "som"))
gamemode = GAME_SOM;
+ else if (strstr(name, "tenebrae"))
+ gamemode = GAME_TENEBRAE;
else
gamemode = GAME_NORMAL;
gamemode = GAME_SETHERAL;
else if (COM_CheckParm ("-som"))
gamemode = GAME_SOM;
+ else if (COM_CheckParm ("-tenebrae"))
+ gamemode = GAME_TENEBRAE;
switch(gamemode)
{
gamename = "Son of Man";
gamedirname = "data";
break;
+ case GAME_TENEBRAE:
+ gamename = "DarkPlaces-Tenebrae";
+ gamedirname = "tenebrae";
+ break;
default:
Sys_Error("COM_InitGameType: unknown gamemode %i\n", gamemode);
break;
*/
void COM_Init (void)
{
-#if !defined(ENDIAN_LITTLE) && !defined(ENDIAN_BIG)
- qbyte swaptest[2] = {1,0};
-
-// set the byte swapping variables in a portable manner
- if ( *(short *)swaptest == 1)
- {
- BigShort = ShortSwap;
- LittleShort = ShortNoSwap;
- BigLong = LongSwap;
- LittleLong = LongNoSwap;
- BigFloat = FloatSwap;
- LittleFloat = FloatNoSwap;
- }
- else
- {
- BigShort = ShortNoSwap;
- LittleShort = ShortSwap;
- BigLong = LongNoSwap;
- LittleLong = LongSwap;
- BigFloat = FloatNoSwap;
- LittleFloat = FloatSwap;
- }
-#endif
-
Cvar_RegisterVariable (®istered);
Cvar_RegisterVariable (&cmdline);