X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=common.c;h=a9b21b6befcdaac4a4b81d650170aa0d2b830fc4;hb=fb50a9a778603419fe35c6c6fbb018b3bcff7783;hp=26997319654de8e385b1e13e0335fab5be1ffcef;hpb=c9f38312122eeb50f64dd2432243f1e587f50ac7;p=xonotic%2Fdarkplaces.git diff --git a/common.c b/common.c index 26997319..a9b21b6b 100644 --- a/common.c +++ b/common.c @@ -33,6 +33,7 @@ cvar_t cmdline = {0, "cmdline","0", "contains commandline the engine was launche char com_token[MAX_INPUTLINE]; int com_argc; const char **com_argv; +int com_selffd = -1; gamemode_t gamemode; const char *gamename; @@ -104,6 +105,26 @@ void StoreBigLong (unsigned char *buffer, unsigned int i) buffer[3] = i & 0xFF; } +void StoreBigShort (unsigned char *buffer, unsigned short i) +{ + buffer[0] = (i >> 8) & 0xFF; + buffer[1] = i & 0xFF; +} + +void StoreLittleLong (unsigned char *buffer, unsigned int i) +{ + buffer[0] = i & 0xFF; + buffer[1] = (i >> 8) & 0xFF; + buffer[2] = (i >> 16) & 0xFF; + buffer[3] = (i >> 24) & 0xFF; +} + +void StoreLittleShort (unsigned char *buffer, unsigned short i) +{ + buffer[0] = i & 0xFF; + buffer[1] = (i >> 8) & 0xFF; +} + /* ============================================================================ @@ -714,7 +735,6 @@ int COM_Wordwrap(const char *string, size_t length, float continuationWidth, flo result += processLine(passthroughPL, startOfLine, cursor - startOfLine, spaceUsedInLine, isContinuation); isContinuation = false; goto out; - break; case '\n': // end of line result += processLine(passthroughPL, startOfLine, cursor - startOfLine, spaceUsedInLine, isContinuation); isContinuation = false; @@ -1479,15 +1499,15 @@ static const gamemode_info_t gamemode_info [GAME_COUNT] = // GAME_EDU2P // COMMANDLINEOPTION: Game: -edu2p runs the game Edu2 prototype { "edu2p", "-edu2p", "EDU2 Prototype", "id1", "edu2", "edu2_p", "edu2prototype" }, -// GAME_BLADEMASTER -// COMMANDLINEOPTION: Game: -blademaster runs the game Prophecy: Return of the BladeMaster -{ "blademaster", "-blademaster", "Prophecy: Return of the BladeMaster", "basebm", NULL, "blademaster", "blademaster" }, // GAME_PROPHECY -// COMMANDLINEOPTION: Game: -prophecy runs the game Quake (default) +// COMMANDLINEOPTION: Game: -prophecy runs the game Prophecy { "prophecy", "-prophecy", "Prophecy", "data", NULL, "prophecy", "prophecy" }, // GAME_BLOODOMNICIDE // COMMANDLINEOPTION: Game: -omnicide runs the game Blood Omnicide { "omnicide", "-omnicide", "Blood Omnicide", "kain", NULL, "omnicide", "omnicide" }, +// GAME_STEELSTORM +// COMMANDLINEOPTION: Game: -steelstorm runs the game Steel Storm +{ "steelstorm", "-steelstorm", "Steel-Storm", "gamedata", NULL, "ss", "steelstorm" }, }; void COM_InitGameType (void)