X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=common.h;h=ecd8b8569f481420691605d12d04c72007f10a67;hb=2105e04af182c4271a02168b05ac08bfcf8a51e2;hp=638c7d448e9b0e602d73df944c6bc777ec55dbbb;hpb=1424b2fc6cba5da0ac58dd94c683821dbab4835d;p=xonotic%2Fdarkplaces.git diff --git a/common.h b/common.h index 638c7d44..ecd8b856 100644 --- a/common.h +++ b/common.h @@ -134,7 +134,7 @@ typedef enum protocolversion_e PROTOCOL_QUAKEWORLD, ///< quakeworld protocol PROTOCOL_NEHAHRABJP, ///< same as QUAKEDP but with 16bit modelindex PROTOCOL_NEHAHRABJP2, ///< same as NEHAHRABJP but with 16bit soundindex - PROTOCOL_NEHAHRABJP3, ///< same as NEHAHRABJP2 but with some changes + PROTOCOL_NEHAHRABJP3 ///< same as NEHAHRABJP2 but with some changes } protocolversion_t; @@ -216,7 +216,13 @@ char *va(const char *format, ...) DP_FUNC_PRINTF(1); // snprintf and vsnprintf are NOT portable. Use their DP counterparts instead +#ifdef snprintf +# undef snprintf +#endif #define snprintf DO_NOT_USE_SNPRINTF__USE_DPSNPRINTF +#ifdef vsnprintf +# undef vsnprintf +#endif #define vsnprintf DO_NOT_USE_VSNPRINTF__USE_DPVSNPRINTF // dpsnprintf and dpvsnprintf @@ -252,6 +258,7 @@ typedef enum gamemode_e GAME_ROGUE, GAME_NEHAHRA, GAME_NEXUIZ, + GAME_XONOTIC, GAME_TRANSFUSION, GAME_GOODVSBAD2, GAME_TEU, @@ -273,6 +280,7 @@ typedef enum gamemode_e GAME_BLOODOMNICIDE, GAME_STEELSTORM, // added by motorsep GAME_STRAPBOMB, // added by motorsep for Urre + GAME_MOONHELM, GAME_COUNT } gamemode_t; @@ -285,6 +293,8 @@ extern const char *gamescreenshotname; extern const char *gameuserdirname; extern char com_modname[MAX_OSPATH]; +void COM_ChangeGameTypeForGameDirs(void); + void COM_ToLowerString (const char *in, char *out, size_t size_out); void COM_ToUpperString (const char *in, char *out, size_t size_out); int COM_StringBeginsWith(const char *s, const char *match); @@ -348,5 +358,10 @@ size_t strlcpy(char *dst, const char *src, size_t siz); void FindFraction(double val, int *num, int *denom, int denomMax); +// decodes XPM file to XPM array (as if #include'd) +char **XPM_DecodeString(const char *in); + +size_t base64_encode(unsigned char *buf, size_t buflen, size_t outbuflen); + #endif