]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - progsvm.h
add a CRC_Block_CaseInsensitive that tolowers its input for use by hash functions...
[xonotic/darkplaces.git] / progsvm.h
index c3346e3af7568ce39bcfa12eaf4dee2324bcfb1d..6c78093642603a9b0211f567a620523d913cc91a 100644 (file)
--- a/progsvm.h
+++ b/progsvm.h
@@ -33,6 +33,11 @@ The code uses void pointers instead.
 #include "progdefs.h"                  // generated by program cdefs
 #include "clprogdefs.h"                        // generated by program cdefs
 
+#ifdef SUPPORT_GECKO
+// forward declaration of clgecko_t
+typedef struct clgecko_s clgecko_t;
+#endif
+
 typedef struct prvm_stack_s
 {
        int                             s;
@@ -114,6 +119,9 @@ typedef struct prvm_edict_s
 
 #define PRVM_MAX_OPENFILES 256
 #define PRVM_MAX_OPENSEARCHES 128
+#ifdef SUPPORT_GECKO
+#define PRVM_MAX_GECKOINSTANCES 32
+#endif
 
 typedef void (*prvm_builtin_t) (void);
 
@@ -237,6 +245,13 @@ typedef struct prvm_prog_globaloffsets_s
        int trace_dphittexturename; // ssqc / csqc
        int trace_dpstartcontents; // ssqc / csqc
        int intermission; // csqc
+       int coop; // csqc
+       int deathmatch; // csqc
+       int dmg_take; // csqc
+       int dmg_save; // csqc
+       int dmg_origin; // csqc
+       int sb_showscores; // csqc
+       int drawfont; // csqc / menu
 }
 prvm_prog_globaloffsets_t;
 
@@ -248,6 +263,7 @@ typedef struct prvm_prog_funcoffsets_s
        func_t CSQC_Ent_Remove; // csqc
        func_t CSQC_Ent_Update; // csqc
        func_t CSQC_Event; // csqc [515]: engine call this for its own needs so csqc can do some things according to what engine it's running on.  example: to say about edicts increase, whatever...
+       func_t CSQC_Event_Sound; // csqc : called by engine when an incoming sound packet arrives so CSQC can act on it
        func_t CSQC_Init; // csqc
        func_t CSQC_InputEvent; // csqc
        func_t CSQC_Parse_CenterPrint; // csqc
@@ -261,12 +277,11 @@ typedef struct prvm_prog_funcoffsets_s
        func_t SV_ChangeTeam; // ssqc
        func_t SV_ParseClientCommand; // ssqc
        func_t SV_PlayerPhysics; // ssqc
+       func_t SV_OnEntityNoSpawnFunction; // ssqc
        func_t GameCommand; // any
 
        // menu qc only uses some functions, nothing else
-       func_t m_display; // mqc
        func_t m_draw; // mqc
-       func_t m_hide; // mqc
        func_t m_init; // mqc
        func_t m_keydown; // mqc
        func_t m_keyup; // mqc
@@ -279,6 +294,7 @@ prvm_prog_funcoffsets_t;
 // NOTE: external code has to create and free the mempools but everything else is done by prvm !
 typedef struct prvm_prog_s
 {
+       double              starttime;
        dprograms_t                     *progs;
        mfunction_t                     *functions;
        char                            *strings;
@@ -305,7 +321,7 @@ typedef struct prvm_prog_s
        // (simple optimization of the free string search)
        int                                     firstfreeknownstring;
        const char                      **knownstrings;
-       unsigned char                           *knownstrings_freeable;
+       unsigned char           *knownstrings_freeable;
        const char                      ***stringshash;
 
        // all memory allocations related to this vm_prog (code, edicts, strings)
@@ -337,6 +353,9 @@ typedef struct prvm_prog_s
 
        qfile_t                         *openfiles[PRVM_MAX_OPENFILES];
        fssearch_t                      *opensearches[PRVM_MAX_OPENSEARCHES];
+#ifdef SUPPORT_GECKO
+       clgecko_t                       *opengeckoinstances[PRVM_MAX_GECKOINSTANCES];
+#endif
 
        // copies of some vars that were former read from sv
        int                                     num_edicts;
@@ -349,8 +368,8 @@ typedef struct prvm_prog_s
        int                                     reserved_edicts; // [INIT]
 
        prvm_edict_t            *edicts;
-       void                            *edictsfields;
-       void                            *edictprivate;
+       void                                    *edictsfields;
+       void                                    *edictprivate;
 
        // size of the engine private struct
        int                                     edictprivate_size; // [INIT]
@@ -367,7 +386,7 @@ typedef struct prvm_prog_s
        char                            *name; // [INIT]
 
        // flag - used to store general flags like PRVM_GE_SELF, etc.
-       int                                     flag;
+       int                             flag;
 
        char                            *extensionstring; // [INIT]
 
@@ -455,6 +474,7 @@ void _PRVM_FreeAll (const char *filename, int fileline);
 
 void PRVM_Profile (int maxfunctions, int mininstructions);
 void PRVM_Profile_f (void);
+void PRVM_CallProfile_f (void);
 void PRVM_PrintFunction_f (void);
 
 void PRVM_PrintState(void);