]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - progsvm.h
changed sbar stats (Monsters/Secrets/Time/map title) around a bit, inspired by a...
[xonotic/darkplaces.git] / progsvm.h
index 8270615d4fd830aa5256302a42364b9a99e63997..673d366f5c52b6922872f42fc2f4ab4c9a0c3e46 100644 (file)
--- a/progsvm.h
+++ b/progsvm.h
@@ -245,8 +245,11 @@ typedef struct prvm_builtin_mem_s
 #define PRVM_FE_CHAIN          4
 #define PRVM_OP_STATE          1
 
-#define        PRVM_MAX_STACK_DEPTH            256
-#define        PRVM_LOCALSTACK_SIZE            2048
+#define        PRVM_MAX_STACK_DEPTH            1024
+#define        PRVM_LOCALSTACK_SIZE            16384
+
+#define PRVM_MAX_OPENFILES 256
+#define PRVM_MAX_OPENSEARCHES 128
 
 typedef void (*prvm_builtin_t) (void);
 
@@ -310,6 +313,9 @@ typedef struct prvm_prog_s
        //============================================================================
        // until this point everything also exists (with the pr_ prefix) in the old vm
 
+       qfile_t                         *openfiles[PRVM_MAX_OPENFILES];
+       fssearch_t                      *opensearches[PRVM_MAX_OPENSEARCHES];
+
        // copies of some vars that were former read from sv
        int                                     num_edicts;
        // number of edicts for which space has been (should be) allocated
@@ -320,7 +326,6 @@ typedef struct prvm_prog_s
        // number of reserved edicts (allocated from 1)
        int                                     reserved_edicts; // [INIT]
 
-
        prvm_edict_t            *edicts;
        void                            *edictsfields;
        void                            *edictprivate;
@@ -377,7 +382,7 @@ typedef struct prvm_prog_s
        void                            (*init_cmd)(void); // [INIT] used by PRVM_InitProg
        void                            (*reset_cmd)(void); // [INIT] used by PRVM_ResetProg
 
-       void                            (*error_cmd)(const char *format, ...); // [INIT]
+       void                            (*error_cmd)(const char *format, ...) DP_FUNC_PRINTF(1); // [INIT]
 
 } prvm_prog_t;
 
@@ -429,6 +434,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);
 void PRVM_Profile_f (void);
 void PRVM_PrintFunction_f (void);
 
@@ -498,6 +504,7 @@ void PRVM_ED_PrintNum (int ent);
 
 const char *PRVM_GetString(int num);
 int PRVM_SetEngineString(const char *s);
+int PRVM_SetTempString(const char *s);
 int PRVM_AllocString(size_t bufferlength, char **pointer);
 void PRVM_FreeString(int num);
 
@@ -514,7 +521,6 @@ void PRVM_FreeString(int num);
 #define PRVM_End       prog = 0
 #endif
 
-
 //#define PRVM_SAFENAME
 #ifndef PRVM_SAFENAME
 #      define PRVM_NAME        (prog->name)
@@ -546,6 +552,7 @@ qboolean PRVM_ProgLoaded(int prognr);
 
 int    PRVM_GetProgNr(void);
 
+void VM_Warning(const char *fmt, ...) DP_FUNC_PRINTF(1);
 
 // TODO: fill in the params
 //void PRVM_Create();