]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - prvm_cmds.h
add menu QC drawsubpic() to draw just part of an image; revert change to DrawQ_SuperPic
[xonotic/darkplaces.git] / prvm_cmds.h
index 562fe586d9ccf8caecf6b60141166ae910d83ad8..8be51b6b47cf5807020ab5ba169041d9eb44e4e0 100644 (file)
@@ -134,7 +134,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()
@@ -189,23 +192,19 @@ float     getserverlistindexforkey(string key)
 // 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);
 
@@ -236,6 +235,7 @@ void VM_etos (void);
 void VM_stof(void);
 void VM_itof(void);
 void VM_ftoe(void);
+void VM_strftime(void);
 void VM_spawn (void);
 void VM_remove (void);
 void VM_find (void);
@@ -245,7 +245,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 +268,6 @@ void VM_min (void);
 void VM_max (void);
 void VM_bound (void);
 void VM_pow (void);
-void VM_copyentity (void);
 void VM_asin (void);
 void VM_acos (void);
 void VM_atan (void);
@@ -283,9 +281,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);
@@ -298,10 +294,14 @@ void VM_strunzone(void);
 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);
@@ -326,12 +326,16 @@ 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_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);
@@ -344,9 +348,6 @@ void VM_cin_getstate( void );
 void VM_cin_restart( void );
 
 void VM_drawline (void);
-void VM_R_PolygonBegin (void);
-void VM_R_PolygonVertex (void);
-void VM_R_PolygonEnd (void);
 
 void VM_bitshift (void);
 
@@ -367,5 +368,28 @@ 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_SetTraceGlobals(const trace_t *trace);
+
 void VM_Cmd_Init(void);
 void VM_Cmd_Reset(void);