X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=prvm_cmds.h;h=5856e569cb94d976d00049aca7b81ef8ef602000;hb=c6bde419ba16d6c3f48941ee5cadb717aead3221;hp=b77b39d6728fa56ad117a797b221a38b19675cd7;hpb=fab6eb344365652bd53d03faa1ea43e14fbe1d7f;p=xonotic%2Fdarkplaces.git diff --git a/prvm_cmds.h b/prvm_cmds.h index b77b39d6..5856e569 100644 --- a/prvm_cmds.h +++ b/prvm_cmds.h @@ -99,7 +99,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) @@ -189,23 +189,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 4096 +#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); @@ -235,7 +231,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 +242,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 +265,11 @@ 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); +void VM_atan2 (void); +void VM_tan (void); void VM_Files_Init(void); void VM_Files_CloseAll(void); @@ -278,9 +278,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,6 +287,11 @@ void VM_stov(void); void VM_strzone(void); void VM_strunzone(void); +// DRESK - String Length (not counting color codes) +void VM_strlennocol(void); +// DRESK - Decolorized String +void VM_strdecolorize(void); + void VM_clcommand (void); void VM_tokenize (void); @@ -322,17 +325,50 @@ 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_stringtokeynum (void); + void VM_cin_open( void ); void VM_cin_close( void ); void VM_cin_setstate( void ); void VM_cin_getstate( void ); void VM_cin_restart( void ); +void VM_drawline (void); + +void VM_bitshift (void); + void VM_altstr_count( void ); void VM_altstr_prepare( void ); void VM_altstr_get( void ); void VM_altstr_set( void ); void VM_altstr_ins(void); +void VM_buf_create(void); +void VM_buf_del (void); +void VM_buf_getsize (void); +void VM_buf_copy (void); +void VM_buf_sort (void); +void VM_buf_implode (void); +void VM_bufstr_get (void); +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_str2chr (void); +void VM_chr2str (void); +void VM_strncmp (void); +void VM_registercvar (void); +void VM_wasfreed (void); + +void VM_SetTraceGlobals(const trace_t *trace); + void VM_Cmd_Init(void); void VM_Cmd_Reset(void);