]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - common.c
fixed GL_Scissor call in rtlight code (apparently I need to feed it a top to bottom...
[xonotic/darkplaces.git] / common.c
index 45e9f814050eac6b858266d88eedeb680bc426b2..43db21a3237c60848320995ff79055067a6d4496 100644 (file)
--- a/common.c
+++ b/common.c
@@ -765,6 +765,8 @@ void COM_InitGameType (void)
                gamemode = GAME_SETHERAL;
        else if (strstr(name, "som"))
                gamemode = GAME_SOM;
+       else if (strstr(name, "tenebrae"))
+               gamemode = GAME_TENEBRAE;
        else
                gamemode = GAME_NORMAL;
 
@@ -794,6 +796,8 @@ void COM_InitGameType (void)
                gamemode = GAME_SETHERAL;
        else if (COM_CheckParm ("-som"))
                gamemode = GAME_SOM;
+       else if (COM_CheckParm ("-tenebrae"))
+               gamemode = GAME_TENEBRAE;
 
        switch(gamemode)
        {
@@ -849,6 +853,10 @@ void COM_InitGameType (void)
                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;
@@ -1115,9 +1123,7 @@ char *SearchInfostring(const char *infostring, const char *key)
 /*     $OpenBSD: strlcpy.c,v 1.8 2003/06/17 21:56:24 millert Exp $     */
 
 
-// Most (all?) BSDs already have them
-#if !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !(defined(__APPLE__) && defined(__MACH__))
-
+#ifndef HAVE_STRLCAT
 size_t
 strlcat(char *dst, const char *src, size_t siz)
 {
@@ -1145,7 +1151,10 @@ strlcat(char *dst, const char *src, size_t siz)
 
        return(dlen + (s - src));       /* count does not include NUL */
 }
+#endif  // #ifndef HAVE_STRLCAT
+
 
+#ifndef HAVE_STRLCPY
 size_t
 strlcpy(char *dst, const char *src, size_t siz)
 {
@@ -1172,4 +1181,4 @@ strlcpy(char *dst, const char *src, size_t siz)
        return(s - src - 1);    /* count does not include NUL */
 }
 
-#endif  // #if !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__FreeBSD__)
+#endif  // #ifndef HAVE_STRLCPY