]> icculus.org git repositories - divverent/nexuiz.git/blob - data/qcsrc/client/csqc_builtins.qc
Added a clientside QuakeC base by Dresk and myself. Included an example of a networke...
[divverent/nexuiz.git] / data / qcsrc / client / csqc_builtins.qc
1 void (vector ang)                                                       makevectors = #1;\r
2 void(entity e, vector o) setorigin      = #2;\r
3 void (entity e, string m)                                               setmodel = #3;\r
4 void(entity e, vector min, vector max) setsize = #4;\r
5 \r
6 void ()                                                                 break = #6;\r
7 float ()                                                                random = #7;\r
8 void (entity e, float chan, string samp, float vol, float atten)        sound = #8;\r
9 vector (vector v)                                                       normalize = #9;\r
10 void (string e)                                                         error = #10;\r
11 void (string e)                                                         objerror = #11;\r
12 float (vector v)                                                        vlen = #12;\r
13 float (vector v)                                                        vectoyaw = #13;\r
14 entity ()                                                               spawn = #14;\r
15 void (entity e)                                                         remove = #15;\r
16 \r
17 void (vector v1, vector v2, float nomonsters, entity forent)            traceline = #16;\r
18 \r
19 entity (entity start, .string fld, string match)                        find = #18;\r
20 string (string s)                                                       precache_sound = #19;\r
21 string (string s)                                                       precache_model = #20;\r
22 \r
23 void (string s)                                                         dprint = #25;\r
24 string (float f)                                                        ftos = #26;\r
25 string (vector v)                                                       vtos = #27;\r
26 void ()                                                                 coredump = #28;\r
27 void ()                                                                 traceon = #29;\r
28 void ()                                                                 traceoff = #30;\r
29 void (entity e)                                                         eprint = #31;\r
30 \r
31 float (float v)                                                         rint = #36;\r
32 float (float v)                                                         floor = #37;\r
33 float (float v)                                                         ceil = #38;\r
34 \r
35 float (vector v)                                                        pointcontents = #41;\r
36 float (float f)                                                         fabs = #43;\r
37 \r
38 float (string s)                                                        cvar = #45;\r
39 void (string s, ...)                                                    localcmd = #46;\r
40 entity (entity e)                                                       nextent = #47;\r
41 \r
42 vector (vector v)                                                       vectoangles = #51;\r
43 \r
44 void (string var, string val)                                           cvar_set = #72;\r
45 \r
46 \r
47 float()                                                                 ReadByte = #360;\r
48 float()                                                                 ReadChar = #361;\r
49 float()                                                                 ReadShort = #362;\r
50 float()                                                                 ReadLong = #363;\r
51 float()                                                                 ReadCoord = #364;\r
52 float()                                                                 ReadAngle = #365;\r
53 string()                                                                ReadString = #366;      //warning: this returns a temporary!\r
54 \r
55 float(string s)                                                         stof = #81;\r
56 \r
57 \r
58 void (vector v1, vector min, vector max, vector v2, float nomonsters, entity forent)    tracebox = #90;\r
59 float (string name, string value)                                       registercvar = #93;\r
60 \r
61 entity (entity start, .entity fld, entity match)                        findentity = #98;\r
62 entity (entity start, .float fld, float match)                          findfloat = #98;\r
63 \r
64 float (string s)                                                        checkextension = #99;\r
65 \r
66 float (string filename, float mode)                                     fopen = #110;\r
67 void (float fhandle)                                                    fclose = #111;\r
68 string (float fhandle)                                                  fgets = #112;\r
69 void (float fhandle, string s)                                          fputs = #113;\r
70 float (string s)                                                        strlen = #114;\r
71 string (...)                                                            strcat = #115;\r
72 string (string s, float start, float length)                            substring = #116;\r
73 vector (string s)                                                       stov = #117;\r
74 string (string s)                                                       strzone = #118;\r
75 void (string s)                                                         strunzone = #119;\r
76 \r
77 void ()                                                                 R_ClearScene = #300;\r
78 void (float mask)                                                       R_AddEntities = #301;\r
79 void (entity e)                                                         R_AddEntity = #302;\r
80 float (float property, ...)                                             R_SetView = #303;\r
81 void ()                                                                 R_RenderScene = #304;\r
82 void (vector org, float radius, vector rgb)                             R_AddDynamicLight = #305;\r
83 void ()                                                                 R_CalcRefDef = #306;\r
84 \r
85 vector (vector v)                                                       cs_unproject = #310;\r
86 vector (vector v)                                                       cs_project = #311;\r
87 \r
88 void    drawline(float width, vector pos1, vector pos2, vector rgb, float alpha, float flags) = #315;\r
89 float   iscachedpic(string name)        = #316;\r
90 string  precache_pic(string name, ...)  = #317;\r
91 vector  drawgetimagesize(string pic) = #318;\r
92 void    freepic(string name)            = #319;\r
93 float   drawcharacter(vector position, float character, vector scale, vector rgb, float alpha, float flag) = #320;\r
94 float   drawstring(vector position, string text, vector scale, vector rgb, float alpha, float flag) = #321;\r
95 float   drawpic(vector position, string pic, vector size, vector rgb, float alpha, float flag) = #322;\r
96 float   drawfill(vector position, vector size, vector rgb, float alpha, float flag) = #323;\r
97 void    drawsetcliparea(float x, float y, float width, float height) = #324;\r
98 void    drawresetcliparea(void) = #325;\r
99 float   drawcolorcodedstring(vector position, string text, vector scale, float alpha, float flag) = #326;\r
100 \r
101 \r
102 float (float statnum)                                                   getstatf = #330;\r
103 float (float statnum)                                                   getstati = #331;\r
104 string (float statnum)                                                  getstats = #332;\r
105 \r
106 void (entity e, float i)                                                setmodelindex = #333;\r
107 string (float i)                                                        modelnameforindex = #334;\r
108 \r
109 float(string efname)                                                    particleeffectnum = #335;\r
110 void(entity ent, float effectnum, vector start, vector end, ...)        trailparticles = #336;\r
111 void (float efnum, vector org, vector vel, float countmultiplier)       pointparticles = #337;\r
112 \r
113 void (string s, ...)                                                    cprint = #338;\r
114 void (string s, ...)                                                    print = #339;\r
115 \r
116 void (float scale)                                                      setsensitivityscale = #347;\r
117 \r
118 \r
119 void (float framenum)                                                   RetrieveMovementFrame = #345;\r
120 void ()                                                                 DefaultPlayerPhysics = #347;\r
121 \r
122 string (float playernum, string key)                                    getplayerkey = #348;\r
123 void (string cmdname)                                                   registercmd = #352;\r
124 vector ()                                                               getmousepos = #344;\r
125 \r
126 string (string s)                                                       uncolorstring = #170;\r
127 \r
128 float ()                                                                playernum = #354;\r
129 \r
130 void (vector org, vector forward, vector right, vector up)              setlistener = #351;\r
131 \r
132 float (vector start, vector end, float ignore, float csqcents)          selecttraceline = #355;\r
133 float ()                                                                isdemo = #349;\r
134 float ()                                                                isserver = #350;\r
135 \r
136 void (float f)                                                          setwantsmousemove = #343;\r
137 string (float key)                                                      getkeybind = #342;\r
138 string (float f)                                                        chr = #78;\r
139 \r
140 vector (vector org)                                                     getlight = #92;\r
141 \r
142 entity (.string fld, string match)                                      findchain = #402;\r
143 entity (.float fld, float match)                                        findchainflags = #450;\r
144 entity (.entity fld, entity match)                                      findchainentity = #403;\r
145 entity (.float fld, float match)                                        findchainfloat = #403;\r
146 entity (entity start, .entity fld, float match)                         findflags = #449;\r
147 \r
148 float (string pattern, float caseinsensitive, float quiet)              search_begin = #444;\r
149 void (float handle)                                                     search_end = #445;\r
150 float (float handle)                                                    search_getsize = #446;\r
151 string (float handle, float num)                                        search_getfilename = #447;\r
152 \r
153 \r
154 float (entity e, float s)                                               getsurfacenumpoints = #434;\r
155 vector (entity e, float s, float n)                                     getsurfacepoint = #435;\r
156 vector (entity e, float s)                                              getsurfacenormal = #436;\r
157 string (entity e, float s)                                              getsurfacetexture = #437;\r
158 float (entity e, vector p)                                              getsurfacenearpoint = #438;\r
159 vector (entity e, float s, vector p)                                    getsurfaceclippedpoint = #439;\r
160 \r
161 float (float a, float b) min = #94;\r
162 float (float a, float b, float c) min3 = #94;\r
163 float (float a, float b, float c, float d) min4 = #94;\r
164 float (float a, float b, float c, float d, float e) min5 = #94;\r
165 float (float a, float b, float c, float d, float e, float f) min6 = #94;\r
166 float (float a, float b, float c, float d, float e, float f, float g) min7 = #94;\r
167 float (float a, float b, float c, float d, float e, float f, float g, float h) min8 = #94;\r
168 float (float a, float b) max = #95;\r
169 float (float a, float b, float c) max3 = #95;\r
170 float (float a, float b, float c, float d) max4 = #95;\r
171 float (float a, float b, float c, float d, float e) max5 = #95;\r
172 float (float a, float b, float c, float d, float e, float f) max6 = #95;\r
173 float (float a, float b, float c, float d, float e, float f, float g) max7 = #95;\r
174 float (float a, float b, float c, float d, float e, float f, float g, float h) max8 = #95;\r
175 float (float minimum, float val, float maximum) bound = #96;\r
176 \r
177 vector () randomvec = #91;\r
178 \r
179 float (float val)               sin = #60;\r
180 float (float val)               cos = #61;\r
181 float (float val)               sqrt = #62;\r
182 float (float a, float b)        pow = #97;\r
183 \r
184 void (vector org, string modelname, float startframe, float endframe, float framerate) effect = #404;\r
185 \r
186 void (vector org, vector velocity, float howmany) te_blood = #405;\r
187 void (vector mincorner, vector maxcorner, float explosionspeed, float howmany) te_bloodshower = #406;\r
188 void (vector org, float radius, float lifetime, vector color) te_customflash = #417;\r
189 void(vector org, vector color) te_explosionrgb = #407;\r
190 void(vector mincorner, vector maxcorner, vector vel, float howmany, float color, float gravityflag, float randomveljitter) te_particlecube = #408;\r
191 void(vector mincorner, vector maxcorner, vector vel, float howmany, float color) te_particlerain = #409;\r
192 void(vector mincorner, vector maxcorner, vector vel, float howmany, float color) te_particlesnow = #410;\r
193 void(vector org) te_plasmaburn = #433;\r
194 void(vector org) te_gunshotquad = #412;\r
195 void(vector org) te_spikequad = #413;\r
196 void(vector org) te_superspikequad = #414;\r
197 void(vector org) te_explosionquad = #415;\r
198 void(vector org) te_smallflash = #416;\r
199 void(vector org, vector vel, float howmany) te_spark = #411;\r
200 \r
201 void(vector org) te_gunshot = #418;\r
202 void(vector org) te_spike = #419;\r
203 void(vector org) te_superspike = #420;\r
204 void(vector org) te_explosion = #421;\r
205 void(vector org) te_tarexplosion = #422;\r
206 void(vector org) te_wizspike = #423;\r
207 void(vector org) te_knightspike = #424;\r
208 void(vector org) te_lavasplash = #425;\r
209 void(vector org) te_teleport = #426;\r
210 void(vector org, float color, float colorlength) te_explosion2 = #427;\r
211 void(entity own, vector start, vector end) te_lightning1 = #428;\r
212 void(entity own, vector start, vector end) te_lightning2 = #429;\r
213 void(entity own, vector start, vector end) te_lightning3 = #430;\r
214 void(entity own, vector start, vector end) te_beam = #431;\r
215 \r
216 float (entity ent, string tagname)      gettagindex = #451;\r
217 vector (entity ent, float tagindex)     gettaginfo = #452;\r
218 \r
219 float (string s)        tokenize = #441;\r
220 string (float argnum)   argv = #442;\r
221 \r
222 string (string s) cvar_string = #448;\r
223 \r
224 float ()                                                buf_create = #460;\r
225 void (float bufhandle)                                  buf_del = #461;\r
226 float (float bufhandle)                                 buf_getsize = #462;\r
227 void (float bufhandle_from, float bufhandle_to)         buf_copy = #463;\r
228 void (float bufhandle, float sortpower, float backward) buf_sort = #464;\r
229 string (float bufhandle, string glue)                   buf_implode = #465;\r
230 string (float bufhandle, float string_index)            bufstr_get = #466;\r
231 void (float bufhandle, float string_index, string str)  bufstr_set = #467;\r
232 float (float bufhandle, string str, float order)        bufstr_add = #468;\r
233 void (float bufhandle, float string_index)              bufstr_free = #469;\r
234 \r
235 float () onground = #355;\r
236 \r
237 void(string texturename, ...) R_BeginPolygon = #306;\r
238 void(vector org, vector texcoords, vector rgb, float alpha) R_PolygonVertex = #307;\r
239 void() R_EndPolygon = #308;\r
240 \r
241 float(string s, float num) charindex = #356;\r
242 \r
243 // Darkplaces Additional Functions\r
244 string(string s) strdecolorize = #477;\r
245 string(string s) strtolower = #480; // returns the passed in string in pure lowercase form\r
246 string(string s) strtoupper = #481; // returns the passed in string in pure uppercase form\r
247 float(string s) strlennocol = #476;\r
248 \r
249 void(vector origin, string sample, float volume, float attenuation) pointsound = #483;