]> icculus.org git repositories - divverent/nexuiz.git/blob - menusrc/mbuiltin.qc
The color control menu should be finished now - the pattern should perhaps be adjuste...
[divverent/nexuiz.git] / menusrc / mbuiltin.qc
1 //////////////////////////////////////////////////
2 // common cmd
3 //////////////////////////////////////////////////
4 // AK FIXME: Create perhaps a special builtin file for the common cmds
5
6 void    checkextension(string ext) = #1;
7
8 // error cmds
9 void    error(string err,...)   = #2;
10 void    objerror(string err,...)        = #3;
11
12 // print
13
14 void    print(string text,...)  = #4;
15 void    bprint(string text,...) = #5;
16 void    sprint(float clientnum, string text,...) = #6;
17 void    centerprint(string text,...) = #7;
18
19 // vector stuff
20
21 vector  normalize(vector v)     = #8;
22 float   vlen(vector v)                  = #9;
23 float   vectoyaw(vector v)              = #10;
24 vector  vectoangles(vector v)   = #11;
25
26 float   random(void)  = #12;
27
28 void    cmd(string command) = #13;
29
30 // cvar cmds
31
32 float   cvar(string name) = #14;
33 const string str_cvar(string name) = #71;
34 void    cvar_set(string name, string value) = #15;
35
36 void    dprint(string text,...) = #16;
37
38 // conversion functions
39
40 string  ftos(float f)  = #17;
41 float   fabs(float f)   = #18;
42 string  vtos(vector v)  = #19;
43 string  etos(entity e) = #20;
44
45 float   stof(string val,...)  = #21;
46
47 entity  spawn(void) = #22;
48 void    remove(entity e) = #23;
49
50 entity  findstring(entity start, .string field, string match)  = #24;
51 entity  findfloat(entity start, .float field, float match) = #25;
52 entity  findentity(entity start, .entity field, entity match) = #25;
53
54 entity  findchainstring(.string field, string match) = #26;
55 entity  findchainfloat(.float field, float match) = #27;
56 entity  findchainentity(.entity field, entity match) = #27;
57
58 string  precache_file(string file) = #28;
59 string  precache_sound(string sample) = #29;
60
61 void    crash(void)     = #72;
62 void    coredump(void) = #30;
63 void    stackdump(void) = #73;
64 void    traceon(void) = #31;
65 void    traceoff(void) = #32;
66
67 void    eprint(entity e)  = #33;
68 float   rint(float f) = #34;
69 float   floor(float f)  = #35;
70 float   ceil(float f)  = #36;
71 entity  nextent(entity e)  = #37;
72 float   sin(float f)  = #38;
73 float   cos(float f)  = #39;
74 float   sqrt(float f)  = #40;
75 vector  randomvec(void)  = #41;
76
77 float   registercvar(string name, string value)  = #42; // returns 1 if success
78 float   min(float f,...)  = #43;
79 float   max(float f,...)  = #44;
80 float   bound(float min,float value, float max)  = #45;
81 float   pow(float a, float b)  = #46;
82 void    copyentity(entity src, entity dst)  = #47;
83
84 float   fopen(string filename, float mode)  = #48;
85 void    fclose(float fhandle)  = #49;
86 string  fgets(float fhandle)  = #50;
87 void    fputs(float fhandle, string s)  = #51;
88
89 float   strlen(string s)  = #52;
90 string  strcat(string s1,string s2,...)  = #53;
91 string  substring(string s, float start, float length)  = #54;
92
93 vector  stov(string s)  = #55;
94
95 string  strzone(string s)  = #56;
96 void    strunzone(string s) = #57;
97
98 float   tokenize(string s)  = #58
99 string  argv(float n)  = #59;
100
101 float   isserver(void)  = #60;
102 float   clientcount(void)  = #61;
103 float   clientstate(void)  = #62;
104 void    clientcommand(float client, string s)  = #63;
105 void    changelevel(string map)  = #64;
106 void    localsound(string sample)  = #65;
107 vector  getmousepos(void)       = #66;
108 float   gettime(void)           = #67;
109 void    loadfromdata(string data) = #68;
110 void    loadfromfile(string file) = #69;
111
112 float   mod(float val, float m) = #70;
113
114 /////////////////////////////////////////////////
115 // Write* Functions
116 /////////////////////////////////////////////////
117 void    WriteByte(float data, float dest, float desto)  = #401;
118 void    WriteChar(float data, float dest, float desto)  = #402;
119 void    WriteShort(float data, float dest, float desto) = #403;
120 void    WriteLong(float data, float dest, float desto)  = #404;
121 void    WriteAngle(float data, float dest, float desto) = #405;
122 void    WriteCoord(float data, float dest, float desto) = #406;
123 void    WriteString(string data, float dest, float desto)= #407;
124 void    WriteEntity(entity data, float dest, float desto) = #408;
125
126 //////////////////////////////////////////////////
127 // Draw funtions
128 //////////////////////////////////////////////////
129
130 float   iscachedpic(string name)        = #451;
131 string  precache_pic(string name)       = #452;
132 void    freepic(string name)            = #453;
133
134 float   drawcharacter(vector position, float character, vector scale, vector rgb, float alpha, float flag) = #454;
135
136 float   drawstring(vector position, string text, vector scale, vector rgb, float alpha, float flag) = #455;
137
138 float   drawpic(vector position, string pic, vector size, vector rgb, float alpha, float flag) = #456;
139
140 float   drawfill(vector position, vector size, vector rgb, float alpha, float flag) = #457;
141
142 void    drawsetcliparea(float x, float y, float width, float height) = #458;
143
144 void    drawresetcliparea(void) = #459;
145
146 vector  drawgetimagesize(string pic) = #460;
147
148 ////////////////////////////////////////////////
149 // Menu functions
150 ////////////////////////////////////////////////
151
152 void    setkeydest(float dest)  = #601;
153 float   getkeydest(void)        = #602;
154
155 void    setmousetarget(float trg) = #603;
156 float   getmousetarget(void)      = #604;
157
158 float   isfunction(string function_name) = #607;
159 void    callfunction(...) = #605;
160 void    writetofile(float fhandle, entity ent) = #606;
161 vector  getresolution(float number) = #608;