X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=prvm_cmds.h;h=5856e569cb94d976d00049aca7b81ef8ef602000;hp=ef95c4f25c7f1aeb68a3e86722bcc266057e37a2;hb=16742571f9a7d696a654668febdc10b4f4affd57;hpb=0960c1f25d397c09f680454759f4ea747975c8c9 diff --git a/prvm_cmds.h b/prvm_cmds.h index ef95c4f2..5856e569 100644 --- a/prvm_cmds.h +++ b/prvm_cmds.h @@ -99,13 +99,20 @@ 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) string altstr_prepare(string) string altstr_get(string,float) string altstr_set(string altstr, float num, string set) string altstr_ins(string altstr, float num, string set) +-------------------------------------- + +entity findflags(entity start, .float field, float match) +entity findchainflags(.float field, float match) + +const string VM_cvar_defstring (string) perhaps only : Menu : WriteMsg =============================== @@ -182,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 ) !\n") +#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); @@ -219,6 +222,7 @@ void VM_break (void); void VM_localcmd (void); void VM_cvar (void); void VM_cvar_string(void); +void VM_cvar_defstring (void); void VM_cvar_set (void); void VM_dprint (void); void VM_ftos (void); @@ -227,15 +231,17 @@ 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); void VM_findfloat (void); void VM_findchain (void); 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); @@ -249,17 +255,6 @@ void VM_floor (void); void VM_ceil (void); void VM_nextent (void); -// REMOVE THESE -sizebuf_t *VM_WriteDest (void); -void VM_WriteByte (void); -void VM_WriteChar (void); -void VM_WriteShort (void); -void VM_WriteLong (void); -void VM_WriteAngle (void); -void VM_WriteCoord (void); -void VM_WriteString (void); -void VM_WriteEntity (void); - void VM_changelevel (void); void VM_sin (void); void VM_cos (void); @@ -270,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); @@ -279,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); @@ -290,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); @@ -323,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);