X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=pr_comp.h;h=46fdc6b70c624aeee86ec6655a6f1ce0dd63ada1;hb=91f9d9a34880dd9210c5c7fbba0906f718693a32;hp=879999970d1fceb5004919cbed28a4276ebc0caf;hpb=0256e57e16a302ad45090618b8d6eb5930788809;p=xonotic%2Fdarkplaces.git diff --git a/pr_comp.h b/pr_comp.h index 87999997..46fdc6b7 100644 --- a/pr_comp.h +++ b/pr_comp.h @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef PR_COMP_H #define PR_COMP_H -typedef int func_t; +typedef unsigned int func_t; typedef int string_t; typedef enum {ev_void, ev_string, ev_float, ev_vector, ev_entity, ev_field, ev_function, ev_pointer} etype_t; @@ -143,41 +143,58 @@ typedef struct int first_statement; // negative numbers are builtins int parm_start; int locals; // total ints of parms + locals - + int profile; // runtime - + int s_name; int s_file; // source file defined in - + int numparms; qbyte parm_size[MAX_PARMS]; } dfunction_t; +typedef struct +{ + int first_statement; // negative numbers are builtins + int parm_start; + int locals; // total ints of parms + locals + + int profile; // runtime + int builtinsprofile; // cost of builtin functions called by this function + int callcount; // times the functions has been called since the last profile call + + int s_name; + int s_file; // source file defined in + + int numparms; + qbyte parm_size[MAX_PARMS]; +} mfunction_t; + #define PROG_VERSION 6 typedef struct { int version; int crc; // check of header file - + int ofs_statements; int numstatements; // statement 0 is an error int ofs_globaldefs; int numglobaldefs; - + int ofs_fielddefs; int numfielddefs; - + int ofs_functions; int numfunctions; // function 0 is an empty - + int ofs_strings; int numstrings; // first string is a null string int ofs_globals; int numglobals; - + int entityfields; } dprograms_t;