]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - prvm_cmds.h
DP_QC_SPRINTF :P
[xonotic/darkplaces.git] / prvm_cmds.h
index 5c9673f0ca0b0d394f717746eef382521b0d6174..0a3eafe53f8e2e56ebacc9b58f5da83368bfd49a 100644 (file)
@@ -88,6 +88,7 @@ float gettime()
                parseentitydata(entity ent, string data)
 float  mod(float val, float m)
 const string   cvar_string (string)
+float  cvar_type (string)
                crash()
                stackdump()
 
@@ -99,7 +100,7 @@ string       search_getfilename(float handle, float num)
 string chr(float ascii)
 
 float  itof(intt ent)
-intt   ftoi(float num)
+entity ftoe(float num)
 
 -------will be removed soon----------
 float  altstr_count(string)
@@ -126,7 +127,7 @@ perhaps only : Menu : WriteMsg
                WriteString(string data, float dest, float desto)
                WriteEntity(entity data, float dest, float desto)
 
-Client & Menu : draw functions & video functions
+Client & Menu : draw functions & video functions (& gecko functions)
 ===================================================
 
 float  iscachedpic(string pic)
@@ -134,7 +135,10 @@ string     precache_pic(string pic)
                freepic(string s)
 float  drawcharacter(vector position, float character, vector scale, vector rgb, float alpha, float flag)
 float  drawstring(vector position, string text, vector scale, vector rgb, float alpha, float flag)
+float  drawcolorcodedstring(vector position, string text, vector scale, float alpha, float flag)
+float  stringwidth(string text, float handleColors)
 float  drawpic(vector position, string pic, vector size, vector rgb, float alpha, float flag)
+float  drawsubpic(vector position, vector size, string pic, vector srcPos, vector srcSize, vector rgb, float alpha, float flag)
 float  drawfill(vector position, vector size, vector rgb, float alpha, float flag)
                drawsetcliparea(float x, float y, float width, float height)
                drawresetcliparea()
@@ -146,6 +150,12 @@ void       cin_setstate(string name, float type)
 float  cin_getstate(string name)
 void   cin_restart(string name)
 
+float[bool] gecko_create( string name )
+void gecko_destroy( string name )
+void gecko_navigate( string name, string URI )
+float[bool] gecko_keyevent( string name, float key, float eventtype ) 
+void gecko_mousemove( string name, float x, float y )
+
 ==============================================================================
 menu cmd list:
 ===============
@@ -184,28 +194,25 @@ float     getserverlistindexforkey(string key)
 #include "mprogdefs.h"
 
 #include "cl_video.h"
+#include "cl_gecko.h"
 
 //============================================================================
 // nice helper macros
 
 #ifndef VM_NOPARMCHECK
-#define VM_SAFEPARMCOUNT(p,f)  if(prog->argc != p) PRVM_ERROR(#f " wrong parameter count (" #p " expected ) !")
+#define VM_SAFEPARMCOUNTRANGE(p1,p2,f) if(prog->argc < p1 || prog->argc > p2) PRVM_ERROR(#f " wrong parameter count %i (" #p1 " to " #p2 " expected ) !", prog->argc)
+#define VM_SAFEPARMCOUNT(p,f)  if(prog->argc != p) PRVM_ERROR(#f " wrong parameter count %i (" #p " expected ) !", prog->argc)
 #else
+#define VM_SAFEPARMCOUNTRANGE(p1,p2,f)
 #define VM_SAFEPARMCOUNT(p,f)
 #endif
 
 #define        VM_RETURN_EDICT(e)              (((int *)prog->globals.generic)[OFS_RETURN] = PRVM_EDICT_TO_PROG(e))
 
-#define e10 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL
-#define e100 e10,e10,e10,e10,e10,e10,e10,e10,e10,e10
-#define e1000 e100,e100,e100,e100,e100,e100,e100,e100,e100,e100
-
-#define VM_STRINGTEMP_BUFFERS 16
 #define VM_STRINGTEMP_LENGTH MAX_INPUTLINE
 
 // builtins and other general functions
 
-char *VM_GetTempString(void);
 void VM_CheckEmptyString (const char *s);
 void VM_VarString(int first, char *out, int outlength);
 
@@ -226,6 +233,7 @@ void VM_break (void);
 void VM_localcmd (void);
 void VM_cvar (void);
 void VM_cvar_string(void);
+void VM_cvar_type (void);
 void VM_cvar_defstring (void);
 void VM_cvar_set (void);
 void VM_dprint (void);
@@ -235,7 +243,8 @@ void VM_vtos (void);
 void VM_etos (void);
 void VM_stof(void);
 void VM_itof(void);
-void VM_ftoi(void);
+void VM_ftoe(void);
+void VM_strftime(void);
 void VM_spawn (void);
 void VM_remove (void);
 void VM_find (void);
@@ -245,7 +254,6 @@ void VM_findchainfloat (void);
 void VM_findflags (void);
 void VM_findchainflags (void);
 void VM_precache_file (void);
-void VM_precache_error (void);
 void VM_precache_sound (void);
 void VM_coredump (void);
 
@@ -269,7 +277,12 @@ void VM_min (void);
 void VM_max (void);
 void VM_bound (void);
 void VM_pow (void);
-void VM_copyentity (void);
+void VM_log (void);
+void VM_asin (void);
+void VM_acos (void);
+void VM_atan (void);
+void VM_atan2 (void);
+void VM_tan (void);
 
 void VM_Files_Init(void);
 void VM_Files_CloseAll(void);
@@ -278,9 +291,7 @@ void VM_fopen(void);
 void VM_fclose(void);
 void VM_fgets(void);
 void VM_fputs(void);
-// used by M_WriteToFile
-// should be only called from a builtin
-qfile_t *VM_GetFileHandle( int index );
+void VM_writetofile(void); // only used by menu
 
 void VM_strlen(void);
 void VM_strcat(void);
@@ -289,9 +300,29 @@ void VM_stov(void);
 void VM_strzone(void);
 void VM_strunzone(void);
 
+// KrimZon - DP_QC_ENTITYDATA
+void VM_numentityfields(void);
+void VM_entityfieldname(void);
+void VM_entityfieldtype(void);
+void VM_getentityfieldstring(void);
+void VM_putentityfieldstring(void);
+// And declared these ones for VM_getentityfieldstring and VM_putentityfieldstring in prvm_cmds.c
+// the function is from prvm_edict.c
+char *PRVM_UglyValueString (etype_t type, prvm_eval_t *val);
+qboolean PRVM_ED_ParseEpair(prvm_edict_t *ent, ddef_t *key, const char *s, qboolean parsebackslash);
+
+// DRESK - String Length (not counting color codes)
+void VM_strlennocol(void);
+// DRESK - Decolorized String
+void VM_strdecolorize(void);
+// DRESK - String Uppercase and Lowercase Support
+void VM_strtolower(void);
+void VM_strtoupper(void);
+
 void VM_clcommand (void);
 
 void VM_tokenize (void);
+void VM_tokenizebyseparator (void);
 void VM_argv (void);
 
 void VM_isserver(void);
@@ -316,15 +347,21 @@ void VM_precache_pic(void);
 void VM_freepic(void);
 void VM_drawcharacter(void);
 void VM_drawstring(void);
+void VM_drawcolorcodedstring(void);
+void VM_stringwidth(void);
 void VM_drawpic(void);
+void VM_drawrotpic(void);
+void VM_drawsubpic(void);
 void VM_drawfill(void);
 void VM_drawsetcliparea(void);
 void VM_drawresetcliparea(void);
 void VM_getimagesize(void);
 
+void VM_makevectors (void);
 void VM_vectorvectors (void);
 
 void VM_keynumtostring (void);
+void VM_findkeysforcommand (void);
 void VM_stringtokeynum (void);
 
 void VM_cin_open( void );
@@ -333,10 +370,15 @@ void VM_cin_setstate( void );
 void VM_cin_getstate( void );
 void VM_cin_restart( void );
 
+void VM_gecko_create( void );
+void VM_gecko_destroy( void );
+void VM_gecko_navigate( void );
+void VM_gecko_keyevent( void );
+void VM_gecko_movemouse( void );
+void VM_gecko_resize( void );
+void VM_gecko_get_texture_extent( void );
+
 void VM_drawline (void);
-void VM_R_PolygonBegin (void);
-void VM_R_PolygonVertex (void);
-void VM_R_PolygonEnd (void);
 
 void VM_bitshift (void);
 
@@ -357,5 +399,54 @@ void VM_bufstr_set (void);
 void VM_bufstr_add (void);
 void VM_bufstr_free (void);
 
+void VM_changeyaw (void);
+void VM_changepitch (void);
+
+void VM_uncolorstring (void);
+
+void VM_strstrofs (void);
+void VM_str2chr (void);
+void VM_chr2str (void);
+void VM_strconv (void);
+void VM_strpad (void);
+void VM_infoadd (void);
+void VM_infoget (void);
+void VM_strncmp (void);
+void VM_strncmp (void);
+void VM_strncasecmp (void);
+void VM_registercvar (void);
+void VM_wasfreed (void);
+
+void VM_strreplace (void);
+void VM_strireplace (void);
+
+void VM_crc16(void);
+
+void VM_SetTraceGlobals(const trace_t *trace);
+void VM_ClearTraceGlobals(void);
+
 void VM_Cmd_Init(void);
 void VM_Cmd_Reset(void);
+
+void VM_uri_escape (void);
+void VM_uri_unescape (void);
+void VM_whichpack (void);
+
+void VM_etof (void);
+void VM_uri_get (void);
+void VM_netaddress_resolve (void);
+
+void VM_tokenize_console (void);
+void VM_argv_start_index (void);
+void VM_argv_end_index (void);
+
+void VM_buf_cvarlist(void);
+void VM_cvar_description(void);
+
+void VM_CL_getextresponse (void);
+void VM_SV_getextresponse (void);
+
+void VM_isfunction(void);
+void VM_callfunction(void);
+
+void VM_sprintf(void);