]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - progs.h
DP code cleanup, stage one - all headers that can be protected by ifdef
[xonotic/darkplaces.git] / progs.h
diff --git a/progs.h b/progs.h
index 166d2eabf3c68a86654ec5f1058d952200402851..f8e15136bdcbe9d0978723a735da799db975ab1a 100644 (file)
--- a/progs.h
+++ b/progs.h
@@ -18,6 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 */
 
+#ifndef PROGS_H
+#define PROGS_H
+
 #include "pr_comp.h"                   // defs shared with qcc
 #include "progdefs.h"                  // generated by program cdefs
 
@@ -53,8 +56,6 @@ typedef struct edict_s
        entvars_t       v;                                      // C exported fields from progs
 // other fields from progs come immediately after
 } edict_t;
-//#define      EDICT_FROM_AREA(l) ((edict_t *)((qbyte *)l - (int)&(((edict_t *)0)->area)))
-//#define      EDICT_FROM_AREA(l) STRUCT_FROM_LINK(l,edict_t,area)
 
 // LordHavoc: in an effort to eliminate time wasted on GetEdictFieldValue...  see pr_edict.c for the functions which use these.
 extern int eval_gravity;
@@ -138,10 +139,7 @@ void ED_LoadFromFile (char *data);
 
 edict_t *EDICT_NUM_ERROR(int n);
 #define EDICT_NUM(n) (n >= 0 ? (n < sv.max_edicts ? (edict_t *)((qbyte *)sv.edicts + (n) * pr_edict_size) : EDICT_NUM_ERROR(n)) : EDICT_NUM_ERROR(n))
-//define EDICT_NUM(n) ((edict_t *)(sv.edicts+ (n)*pr_edict_size))
-//define NUM_FOR_EDICT(e) (((qbyte *)(e) - sv.edicts)/pr_edict_size)
 
-//edict_t *EDICT_NUM(int n);
 int NUM_FOR_EDICT(edict_t *e);
 
 #define        NEXT_EDICT(e) ((edict_t *)( (qbyte *)e + pr_edict_size))
@@ -183,5 +181,5 @@ void PR_RunError (char *error, ...);
 void ED_PrintEdicts (void);
 void ED_PrintNum (int ent);
 
-//eval_t *GetEdictFieldValue(edict_t *ed, char *field);
+#endif