]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - common.h
cvar: Remove unused ignore_callback variable
[xonotic/darkplaces.git] / common.h
index d11b141cb9d92c491a42cf33dca9c65a910bbf42..4f5e88b36f5d0583ad5bbfdd975d06fa2446e180 100644 (file)
--- a/common.h
+++ b/common.h
@@ -1,5 +1,6 @@
 /*
 Copyright (C) 1996-1997 Id Software, Inc.
+Copyright (C) 2000-2020 DarkPlaces contributors
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
@@ -21,6 +22,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #ifndef COMMON_H
 #define COMMON_H
 
+#include <stdarg.h>
+#include "qtypes.h"
+#include "qdefs.h"
 
 /// MSVC has a different name for several standard functions
 #ifdef WIN32
@@ -38,7 +42,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 //============================================================================
 
-#define ContainerOf(ptr, type, member) ((type *)((void *)&(ptr) - offsetof(type, member)))
+#define ContainerOf(ptr, type, member) ((type *)((char *)&(ptr) - offsetof(type, member)))
 
 typedef struct sizebuf_s
 {
@@ -295,6 +299,7 @@ typedef enum gamemode_e
        GAME_MOONHELM,
        GAME_VORETOURNAMENT,
        GAME_DOOMBRINGER, // added by Cloudwalk for kristus
+       GAME_BATTLEMETAL, // added by Cloudwalk for Subject9x
        GAME_COUNT
 }
 gamemode_t;