]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - progsvm.h
fix annotation of crypto fields
[xonotic/darkplaces.git] / progsvm.h
index 9481800e4cbbe81f6b446a9b231bf29ccf7b721e..1dc25e813d198d1b6f1b8bbfb29963ae55c15fc9 100644 (file)
--- a/progsvm.h
+++ b/progsvm.h
@@ -44,6 +44,7 @@ typedef struct prvm_stack_s
 {
        int                             s;
        mfunction_t             *f;
+       double                  tprofile_acc;
        double                  profile_acc;
        double                  builtinsprofile_acc;
 } prvm_stack_t;
@@ -187,9 +188,9 @@ typedef struct prvm_prog_fieldoffsets_s
        int dimension_hit; // ssqc / csqc
        int dimension_solid; // ssqc / csqc
        int disableclientprediction; // ssqc
+       int discardabledemo; // ssqc
        int dphitcontentsmask; // ssqc / csqc
        int drawonlytoclient; // ssqc
-       int effects; // ssqc / csqc
        int exteriormodeltoclient; // ssqc
        int fatness; // ssqc / csqc
        int forceshader; // csqc
@@ -247,6 +248,7 @@ typedef struct prvm_prog_fieldoffsets_s
        int yaw_speed; // ssqc / csqc
        int bouncefactor; // ssqc
        int bouncestop; // ssqc
+       int sendcomplexanimation; // ssqc
 
        int solid; // ssqc / csqc (physics)
        int movetype; // ssqc / csqc (physics)
@@ -266,6 +268,19 @@ typedef struct prvm_prog_fieldoffsets_s
        int enemy; // ssqc / csqc (physics)
        int aiment; // ssqc / csqc (physics)
        int movedir; // ssqc / csqc (physics)
+
+       int camera_transform; // csqc (warpzones)
+
+       int userwavefunc_param0; // csqc (userwavefunc)
+       int userwavefunc_param1; // csqc (userwavefunc)
+       int userwavefunc_param2; // csqc (userwavefunc)
+       int userwavefunc_param3; // csqc (userwavefunc)
+
+       int crypto_keyfp; // ssqc (DP_CRYPTO)
+       int crypto_mykeyfp; // ssqc (DP_CRYPTO)
+       int crypto_idfp; // ssqc (DP_CRYPTO)
+       int crypto_encryptmethod; // ssqc (DP_CRYPTO)
+       int crypto_signmethod; // ssqc (DP_CRYPTO)
 }
 prvm_prog_fieldoffsets_t;
 
@@ -280,6 +295,8 @@ typedef struct prvm_prog_globaloffsets_s
        int v_right; // ssqc / csqc
        int v_up; // ssqc / csqc
        int view_angles; // csqc
+       int view_punchangle; // csqc
+       int view_punchvector; // csqc
        int trace_allsolid; // ssqc / csqc
        int trace_startsolid; // ssqc / csqc
        int trace_fraction; // ssqc / csqc
@@ -315,6 +332,11 @@ typedef struct prvm_prog_globaloffsets_s
        int gettaginfo_right; // ssqc / csqc
        int gettaginfo_up; // ssqc / csqc
        int transparent_offset; // csqc
+
+       int particles_alphamin; // csqc
+       int particles_alphamax; // csqc
+       int particles_colormin; // csqc
+       int particles_colormax; // csqc
 }
 prvm_prog_globaloffsets_t;
 
@@ -357,15 +379,20 @@ typedef struct prvm_prog_funcoffsets_s
        func_t m_keyup; // mqc
        func_t m_shutdown; // mqc
        func_t m_toggle; // mqc
+       func_t m_newmap; // mqc
 }
 prvm_prog_funcoffsets_t;
 
+// stringbuffer flags
+#define STRINGBUFFER_SAVED     1 // saved in savegames
+
 typedef struct prvm_stringbuffer_s
 {
        int max_strings;
        int num_strings;
        char **strings;
        const char *origin;
+       unsigned char flags;
 }
 prvm_stringbuffer_t;
 
@@ -468,12 +495,12 @@ typedef struct prvm_prog_s
        qboolean                        allowworldwrites;
 
        // name of the prog, e.g. "Server", "Client" or "Menu" (used for text output)
-       char                            *name; // [INIT]
+       const char                      *name; // [INIT]
 
        // flag - used to store general flags like PRVM_GE_SELF, etc.
        int                             flag;
 
-       char                            *extensionstring; // [INIT]
+       const char                      *extensionstring; // [INIT]
 
        qboolean                        loadintoworld; // [INIT]
 
@@ -538,8 +565,8 @@ extern const int vm_sv_numbuiltins;
 extern const int vm_cl_numbuiltins;
 extern const int vm_m_numbuiltins;
 
-extern char * vm_sv_extensions; // client also uses this
-extern char * vm_m_extensions;
+extern const char * vm_sv_extensions; // client also uses this
+extern const char * vm_m_extensions;
 
 void VM_SV_Cmd_Init(void);
 void VM_SV_Cmd_Reset(void);
@@ -574,7 +601,7 @@ void *_PRVM_Alloc (size_t buffersize, const char *filename, int fileline);
 void _PRVM_Free (void *buffer, const char *filename, int fileline);
 void _PRVM_FreeAll (const char *filename, int fileline);
 
-void PRVM_Profile (int maxfunctions, int mininstructions, int sortby);
+void PRVM_Profile (int maxfunctions, double mintime, int sortby);
 void PRVM_Profile_f (void);
 void PRVM_ChildProfile_f (void);
 void PRVM_CallProfile_f (void);
@@ -613,7 +640,7 @@ void PRVM_ED_ParseGlobals (const char *data);
 
 void PRVM_ED_LoadFromFile (const char *data);
 
-unsigned int PRVM_EDICT_NUM_ERROR(unsigned int n, char *filename, int fileline);
+unsigned int PRVM_EDICT_NUM_ERROR(unsigned int n, const char *filename, int fileline);
 #define        PRVM_EDICT(n) (((unsigned)(n) < (unsigned int)prog->max_edicts) ? (unsigned int)(n) : PRVM_EDICT_NUM_ERROR((unsigned int)(n), __FILE__, __LINE__))
 #define        PRVM_EDICT_NUM(n) (prog->edicts + PRVM_EDICT(n))
 
@@ -696,7 +723,7 @@ Load a program with LoadProgs
 */
 void PRVM_InitProg(int prognr);
 // LoadProgs expects to be called right after InitProg
-void PRVM_LoadProgs (const char *filename, int numrequiredfunc, char **required_func, int numrequiredfields, prvm_required_field_t *required_field, int numrequiredglobals, char **required_global);
+void PRVM_LoadProgs (const char *filename, int numrequiredfunc, const char **required_func, int numrequiredfields, prvm_required_field_t *required_field, int numrequiredglobals, char **required_global);
 void PRVM_ResetProg(void);
 
 qboolean PRVM_ProgLoaded(int prognr);