]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - gmqcc.h
Need to keep prog->entities up to date when spawning entities
[xonotic/gmqcc.git] / gmqcc.h
diff --git a/gmqcc.h b/gmqcc.h
index bfc22d96a5c28504a6dbb7fb42597cb849223ec2..26428b82ac6c104063a0d80b5ae830f9ebbcc0fa 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -342,7 +342,7 @@ uint32_t util_crc32(const char *, int, register const short);
         while (N##_add(*++elements) != -1 && len--);            \
         return N##_elements;                                    \
     }                                                           \
-    typedef char VECTOR_FILL(extra_semicolon_,__COUNTER__)
+    typedef char VECTOR_FILL(extra_semicolon_##N,__COUNTER__)
 #define VECTOR_PROT(T,N)                                        \
     extern T*     N##_data     ;                                \
     extern long   N##_elements ;                                \
@@ -584,6 +584,9 @@ VECTOR_PROT(prog_section_function,  code_functions );
 VECTOR_PROT(int,                    code_globals   );
 VECTOR_PROT(char,                   code_chars     );
 
+typedef float   qcfloat;
+typedef int32_t qcint;
+
 /*
  * code_write -- writes out the compiled file
  * code_init  -- prepares the code file
@@ -592,6 +595,7 @@ bool     code_write       (const char *filename);
 void     code_init        ();
 uint32_t code_genstring   (const char *string);
 uint32_t code_cachedstring(const char *string);
+qcint    code_alloc_field (size_t qcsize);
 
 /*===================================================================*/
 /*========================= assembler.c =============================*/
@@ -866,9 +870,6 @@ typedef struct {
  * Since we may want to support that as well, let's redefine
  * float and int here.
  */
-typedef float   qcfloat;
-typedef int32_t qcint;
-
 typedef union {
     qcint   _int;
     qcint    string;
@@ -916,6 +917,7 @@ typedef struct qc_program_s {
     MEM_VECTOR_MAKE(char,                   strings);
     MEM_VECTOR_MAKE(qcint,                  globals);
     MEM_VECTOR_MAKE(qcint,                  entitydata);
+    MEM_VECTOR_MAKE(bool,                   entitypool);
 
     size_t tempstring_start;
     size_t tempstring_at;
@@ -989,13 +991,13 @@ static const opts_flag_def opts_flag_list[] = {
 };
 
 enum {
-# define GMQCC_DEFINE_FLAG(X) X,
+# define GMQCC_DEFINE_FLAG(X) WARN_##X,
 #  include "warns.def"
 # undef GMQCC_DEFINE_FLAG
     COUNT_WARNINGS
 };
 static const opts_flag_def opts_warn_list[] = {
-# define GMQCC_DEFINE_FLAG(X) { #X, LONGBIT(X) },
+# define GMQCC_DEFINE_FLAG(X) { #X, LONGBIT(WARN_##X) },
 #  include "warns.def"
 # undef GMQCC_DEFINE_FLAG
     { NULL, LONGBIT(0) }