#include "progdefs.h" // generated by program cdefs
#include "clprogdefs.h" // generated by program cdefs
+#ifdef SUPPORT_GECKO
+// forward declaration of clgecko_t
+struct clgecko_s;
+#endif
+
typedef struct prvm_stack_s
{
int 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);
int dmg_take; // csqc
int dmg_save; // csqc
int dmg_origin; // csqc
-
+ int sb_showscores; // csqc
+ int drawfont; // csqc / menu
}
prvm_prog_globaloffsets_t;
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
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
// 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;
// (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)
qfile_t *openfiles[PRVM_MAX_OPENFILES];
fssearch_t *opensearches[PRVM_MAX_OPENSEARCHES];
+#ifdef SUPPORT_GECKO
+ struct clgecko_s *opengeckoinstances[PRVM_MAX_GECKOINSTANCES];
+#endif
// copies of some vars that were former read from sv
int num_edicts;
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]
char *name; // [INIT]
// flag - used to store general flags like PRVM_GE_SELF, etc.
- int flag;
+ int flag;
char *extensionstring; // [INIT]
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);