2 ==============================================================================
4 SOURCE FOR GLOBALVARS_T C STRUCTURE
5 MUST NOT BE MODIFIED, OR CRC ERRORS WILL APPEAR
7 ==============================================================================
19 float player_localentnum; //the entnum
20 float player_localnum; //the playernum
21 float maxclients; //a constant filled in by the engine. gah, portability eh?
23 float clientcommandframe; //player movement
24 float servercommandframe; //clientframe echoed off the server
29 // global variables set by built in functions
31 vector v_forward, v_up, v_right; // set by makevectors()
33 // set by traceline / tracebox
35 float trace_startsolid;
38 vector trace_plane_normal;
39 float trace_plane_dist;
45 // required prog functions
49 float(float f, float t, float n) CSQC_InputEvent;
50 void(float w, float h) CSQC_UpdateView;
51 float(string s) CSQC_ConsoleCommand;
53 //these fields are read and set by the default player physics
58 //retrieved from the current movement commands (read by player physics)
59 float input_timelength;
61 vector input_movevalues; //forwards, right, up.
62 float input_buttons; //attack, use, jump (default physics only uses jump)
64 float movevar_gravity;
65 float movevar_stopspeed;
66 float movevar_maxspeed;
67 float movevar_spectatormaxspeed; //used by NOCLIP movetypes.
68 float movevar_accelerate;
69 float movevar_airaccelerate;
70 float movevar_wateraccelerate;
71 float movevar_friction;
72 float movevar_waterfriction;
73 float movevar_entgravity; //the local player's gravity field. Is a multiple (1 is the normal value)
75 //================================================
76 void end_sys_globals; // flag for structure dumping
77 //================================================
80 ==============================================================================
82 SOURCE FOR ENTVARS_T C STRUCTURE
83 MUST NOT BE MODIFIED, OR CRC ERRORS WILL APPEAR
85 ==============================================================================
89 // system fields (*** = do not set in prog code, maintained by C code)
91 .float modelindex; // *** model index in the precached list
92 .vector absmin, absmax; // *** origin + mins / maxs
94 .float entnum; // *** the ent number as on the server
101 .vector origin; // ***
102 .vector oldorigin; // ***
107 .string classname; // spawn function
113 .vector mins, maxs; // bounding box extents reletive to origin
114 .vector size; // maxs - mins
119 .void() blocked; // for doors or plats, called when can't push other
133 .entity owner; // who launched a missile
135 //================================================
136 void end_sys_fields; // flag for structure dumping
137 //================================================
140 ==============================================================================
142 OPTIONAL FIELDS AND GLOBALS
144 ==============================================================================
147 // Additional OPTIONAL Fields and Globals
150 vector view_angles; // same as input_angles
151 vector view_punchangle;
152 vector view_punchvector;
155 ==============================================================================
159 ==============================================================================
162 const float MASK_ENGINE = 1;
163 const float MASK_ENGINEVIEWMODELS = 2;
164 const float MASK_NORMAL = 4;
166 const float RF_VIEWMODEL = 1;
167 const float RF_EXTERNALMODEL = 2;
168 const float RF_DEPTHHACK = 4;
169 const float RF_ADDATIVE = 8;
170 const float RF_USEAXIS = 16;
172 const float VF_MIN = 1; //(vector)
173 const float VF_MIN_X = 2; //(float)
174 const float VF_MIN_Y = 3; //(float)
175 const float VF_SIZE = 4; //(vector) (viewport size)
176 const float VF_SIZE_Y = 5; //(float)
177 const float VF_SIZE_X = 6; //(float)
178 const float VF_VIEWPORT = 7; //(vector, vector)
179 const float VF_FOV = 8; //(vector)
180 const float VF_FOVX = 9; //(float)
181 const float VF_FOVY = 10; //(float)
182 const float VF_ORIGIN = 11; //(vector)
183 const float VF_ORIGIN_X = 12; //(float)
184 const float VF_ORIGIN_Y = 13; //(float)
185 const float VF_ORIGIN_Z = 14; //(float)
186 const float VF_ANGLES = 15; //(vector)
187 const float VF_ANGLES_X = 16; //(float)
188 const float VF_ANGLES_Y = 17; //(float)
189 const float VF_ANGLES_Z = 18; //(float)
190 const float VF_DRAWWORLD = 19; //(float)
191 const float VF_DRAWENGINESBAR = 20; //(float)
192 const float VF_DRAWCROSSHAIR = 21; //(float)
194 const float VF_CL_VIEWANGLES = 33; //(vector)
195 const float VF_CL_VIEWANGLES_X = 34; //(float)
196 const float VF_CL_VIEWANGLES_Y = 35; //(float)
197 const float VF_CL_VIEWANGLES_Z = 36; //(float)
199 const float VF_PERSPECTIVE = 200;
201 const float STAT_HEALTH = 0;
202 const float STAT_WEAPONMODEL = 2;
203 const float STAT_AMMO = 3;
204 const float STAT_ARMOR = 4;
205 const float STAT_WEAPONFRAME = 5;
206 const float STAT_SHELLS = 6;
207 const float STAT_NAILS = 7;
208 const float STAT_ROCKETS = 8;
209 const float STAT_CELLS = 9;
210 const float STAT_ACTIVEWEAPON = 10;
211 const float STAT_TOTALSECRETS = 11;
212 const float STAT_TOTALMONSTERS = 12;
213 const float STAT_SECRETS = 13;
214 const float STAT_MONSTERS = 14;
215 const float STAT_ITEMS = 15;
216 const float STAT_VIEWHEIGHT = 16;
218 // Quake Sound Constants
219 const float CHAN_AUTO = 0;
220 const float CHAN_WEAPON = 1;
221 const float CHAN_VOICE = 2;
222 const float CHAN_ITEM = 3;
223 const float CHAN_BODY = 4;
225 const float ATTN_NONE = 0;
226 const float ATTN_NORM = 1;
227 const float ATTN_IDLE = 2;
228 const float ATTN_STATIC = 3;
230 // Frik File Constants
231 const float FILE_READ = 0;
232 const float FILE_APPEND = 1;
233 const float FILE_WRITE = 2;
235 // Quake Point Contents
236 const float CONTENT_EMPTY = -1;
237 const float CONTENT_SOLID = -2;
238 const float CONTENT_WATER = -3;
239 const float CONTENT_SLIME = -4;
240 const float CONTENT_LAVA = -5;
241 const float CONTENT_SKY = -6;
243 // Quake Solid Constants
244 const float SOLID_NOT = 0;
245 const float SOLID_TRIGGER = 1;
246 const float SOLID_BBOX = 2;
247 const float SOLID_SLIDEBOX = 3;
248 const float SOLID_BSP = 4;
249 const float SOLID_CORPSE = 5;
251 // Quake Move Constants
252 const float MOVE_NORMAL = 0;
253 const float MOVE_NOMONSTERS = 1;
254 const float MOVE_MISSILE = 2;
257 const float true = 1;
258 const float false = 0;
259 const float TRUE = 1;
260 const float FALSE = 0;
262 const float EXTRA_LOW = -99999999;
263 const float EXTRA_HIGH = 99999999;
265 const vector VEC_1 = '1 1 1';
266 const vector VEC_0 = '0 0 0';
267 const vector VEC_M1 = '-1 -1 -1';
269 const float M_PI = 3.14159265358979323846;
271 vector VEC_HULL_MIN = '-16 -16 -24';
272 vector VEC_HULL_MAX = '16 16 32';
274 // Quake Temporary Entity Constants
275 const float TE_SPIKE = 0;
276 const float TE_SUPERSPIKE = 1;
277 const float TE_GUNSHOT = 2;
278 const float TE_EXPLOSION = 3;
279 const float TE_TAREXPLOSION = 4;
280 const float TE_LIGHTNING1 = 5;
281 const float TE_LIGHTNING2 = 6;
282 const float TE_WIZSPIKE = 7;
283 const float TE_KNIGHTSPIKE = 8;
284 const float TE_LIGHTNING3 = 9;
285 const float TE_LAVASPLASH = 10;
286 const float TE_TELEPORT = 11;
287 const float TE_EXPLOSION2 = 12;
288 // Darkplaces Additions
289 const float TE_EXPLOSIONRGB = 53;
290 const float TE_GUNSHOTQUAD = 57;
291 const float TE_EXPLOSIONQUAD = 70;
292 const float TE_SPIKEQUAD = 58;
293 const float TE_SUPERSPIKEQUAD = 59;
295 // PFlags for Dynamic Lights
296 const float PFLAGS_NOSHADOW = 1;
297 const float PFLAGS_CORONA = 2;
298 const float PFLAGS_FULLDYNAMIC = 128;
300 const float EF_ADDITIVE = 32;
301 const float EF_BLUE = 64;
302 const float EF_FLAME = 1024;
303 const float EF_FULLBRIGHT = 512;
304 const float EF_NODEPTHTEST = 8192;
305 const float EF_NODRAW = 16;
306 const float EF_NOSHADOW = 4096;
307 const float EF_RED = 128;
308 const float EF_STARDUST = 2048;
309 const float EF_SELECTABLE = 16384;
311 const float PFL_ONGROUND = 1;
312 const float PFL_CROUCH = 2;
313 const float PFL_DEAD = 4;
314 const float PFL_GIBBED = 8;
317 ==============================================================================
320 EXTENSIONS ARE NOT ADDED HERE, BUT BELOW!
322 ==============================================================================
325 void(vector ang) makevectors = #1;
326 void(entity e, vector o) setorigin = #2;
327 void(entity e, string m) setmodel = #3;
328 void(entity e, vector min, vector max) setsize = #4;
332 void(entity e, float chan, string samp) sound = #8;
333 vector(vector v) normalize = #9;
334 void(string e) error = #10;
335 void(string e) objerror = #11;
336 float(vector v) vlen = #12;
337 float(vector v) vectoyaw = #13;
338 entity() spawn = #14;
339 void(entity e) remove = #15;
340 float(vector v1, vector v2, float tryents, entity ignoreentity) traceline = #16;
342 entity(entity start, .string fld, string match) find = #18;
343 void(string s) precache_sound = #19;
344 void(string s) precache_model = #20;
346 entity(vector org, float rad) findradius = #22;
348 void(string s, ...) dprint = #25;
349 string(float f) ftos = #26;
350 string(vector v) vtos = #27;
351 void() coredump = #28;
352 void() traceon = #29;
353 void() traceoff = #30;
354 void(entity e) eprint = #31;
356 float(float yaw, float dist, float settrace) walkmove = #32;
358 float() droptofloor = #34;
359 void(float style, string value) lightstyle = #35;
360 float(float v) rint = #36;
361 float(float v) floor = #37;
362 float(float v) ceil = #38;
364 float(entity e) checkbottom = #40;
365 float(vector v) pointcontents = #41;
367 float(float f) fabs = #43;
369 float(string s) cvar = #45;
370 void(string s, ...) localcmd = #46;
371 entity(entity e) nextent = #47;
372 void(vector o, vector d, float color, float count) particle = #48;
373 void() ChangeYaw = #49;
375 vector(vector v) vectoangles = #51;
376 vector(vector v, vector w) vectoangles2 = #51;
378 float(float f) sin = #60;
379 float(float f) cos = #61;
380 float(float f) sqrt = #62;
381 void(entity ent) changepitch = #63;
382 void(entity e, entity ignore) tracetoss = #64;
383 string(entity ent) etos = #65;
385 string(string s) precache_file = #68;
386 void(entity e) makestatic = #69;
388 void(string var, string val) cvar_set = #72;
390 void(vector pos, string samp, float vol, float atten) ambientsound = #74;
391 string(string s) precache_model2 = #75;
392 string(string s) precache_sound2 = #76;
393 string(string s) precache_file2 = #77;
395 float(string s) stof = #81;
398 void(vector v1, vector min, vector max, vector v2, float nomonsters, entity forent) tracebox = #90;
399 vector() randomvec = #91;
400 vector(vector org) getlight = #92;
401 vector(vector org, float lpflags) getlight2 = #92;
402 const float LP_LIGHTMAP = 1;
403 const float LP_RTWORLD = 2;
404 const float LP_DYNLIGHT = 4;
405 const float LP_COMPLETE = 7;
407 float(string name, string value) registercvar = #93;
408 float( float a, ... ) min = #94;
409 float( float b, ... ) max = #95;
410 float(float minimum, float val, float maximum) bound = #96;
411 float(float f, float f) pow = #97;
412 entity(entity start, .float fld, float match) findfloat = #98;
413 float(string s) checkextension = #99;
414 // FrikaC and Telejano range #100-#199
416 float(string filename, float mode) fopen = #110;
417 void(float fhandle) fclose = #111;
418 string(float fhandle) fgets = #112;
419 void(float fhandle, string s) fputs = #113;
420 float(string s) strlen = #114;
421 string(...) strcat = #115;
422 string(string s, float start, float length) substring = #116;
423 vector(string) stov = #117;
424 string(string s) strzone = #118;
425 void(string s) strunzone = #119;
427 // FTEQW range #200-#299
429 float(float number, float quantity) bitshift = #218;
431 //float(string str, string sub[, float startpos]) strstrofs = #221;
432 float(string str, string sub, float startpos) strstrofs = #221;
433 float(string str, float ofs) str2chr = #222;
434 string(float c, ...) chr2str = #223;
435 string(float ccase, float calpha, float cnum, string s, ...) strconv = #224;
436 string(float chars, string s, ...) strpad = #225;
437 string(string info, string key, string value, ...) infoadd = #226;
438 string(string info, string key) infoget = #227;
439 float(string s1, string s2, float len) strncmp = #228;
440 float(string s1, string s2) strcasecmp = #229;
441 float(string s1, string s2, float len) strncasecmp = #230;
443 // CSQC range #300-#399
444 void() clearscene = #300;
445 void(float mask) addentities = #301;
446 void(entity ent) addentity = #302;
447 float(float property, ...) setproperty = #303;
448 void() renderscene = #304;
449 void(vector org, float radius, vector lightcolours) adddynamiclight = #305;
450 void(vector org, float radius, vector lightcolours, float style, string cubemapname, float pflags) adddynamiclight2 = #305;
451 //void(string texturename, float flag[, float is2d, float lines]) R_BeginPolygon = #306;
452 void(string texturename, float flag, float is2d, float lines) R_BeginPolygon = #306;
453 void(vector org, vector texcoords, vector rgb, float alpha) R_PolygonVertex = #307;
454 void() R_EndPolygon = #308;
455 vector (vector v) cs_unproject = #310;
456 vector (vector v) cs_project = #311;
458 void(float width, vector pos1, vector pos2, float flag) drawline = #315;
459 float(string name) iscachedpic = #316;
460 string(string name, float trywad) precache_pic = #317;
461 string(string name) precache_cubemap = #317;
462 vector(string picname) draw_getimagesize = #318;
463 void(string name) freepic = #319;
464 float(vector position, float character, vector scale, vector rgb, float alpha, float flag) drawcharacter = #320;
465 float(vector position, string text, vector scale, vector rgb, float alpha, float flag) drawstring = #321;
466 float(vector position, string pic, vector size, vector rgb, float alpha, float flag) drawpic = #322;
467 float(vector position, vector size, vector rgb, float alpha, float flag) drawfill = #323;
468 void(float x, float y, float width, float height) drawsetcliparea = #324;
469 void(void) drawresetcliparea = #325;
470 float(vector position, string text, vector scale, float alpha, float flag) drawcolorcodedstring = #326;
471 vector(vector position, string text, vector scale, vector rgb, float alpha, float flag) drawcolorcodedstring2 = #326;
473 float(float stnum) getstatf = #330;
474 float(float stnum) getstati = #331;
475 string(float firststnum) getstats = #332;
476 void(entity e, float mdlindex) setmodelindex = #333;
477 string(float mdlindex) modelnameforindex = #334;
478 float(string effectname) particleeffectnum = #335;
479 void(entity ent, float effectnum, vector start, vector end) trailparticles = #336;
480 //void(float effectnum, vector origin [, vector dir, float count]) pointparticles = #337;
481 void(float effectnum, vector origin , vector dir, float count) pointparticles = #337;
482 void(string s, ...) centerprint = #338;
483 void(string s, ...) print = #339;
484 string(float keynum) keynumtostring = #340;
485 float(string keyname) stringtokeynum = #341;
486 string(float keynum) getkeybind = #342;
487 void(float usecursor) setcursormode = #343;
488 vector() getmousepos = #344;
489 float(float framenum) getinputstate = #345;
490 void(float sens) setsensitivityscale = #346;
491 void() runstandardplayerphysics = #347;
492 string(float playernum, string keyname) getplayerkeyvalue = #348;
493 float() isdemo = #349;
494 float() isserver = #350;
495 void(vector origin, vector forward, vector right, vector up) SetListener = #351;
496 void(string cmdname) registercommand = #352;
497 float(entity ent) wasfreed = #353;
498 string(string key) serverkey = #354;
500 // Use proper case; refer to the id1 Write* functions!
501 float() ReadByte = #360;
502 float() ReadChar = #361;
503 float() ReadShort = #362;
504 float() ReadLong = #363;
505 float() ReadCoord = #364;
506 float() ReadAngle = #365;
507 string() ReadString = #366;
508 float() ReadFloat = #367;
510 // LordHavoc's range #400-#499
511 void(entity from, entity to) copyentity = #400;
513 entity(.string fld, string match) findchain = #402;
514 entity(.float fld, float match) findchainfloat = #403;
515 void(vector org, string modelname, float startframe, float endframe, float framerate) effect = #404;
516 void(vector org, vector velocity, float howmany) te_blood = #405;
517 void(vector mincorner, vector maxcorner, float explosionspeed, float howmany) te_bloodshower = #406;
518 void(vector org, vector color) te_explosionrgb = #407;
519 void(vector mincorner, vector maxcorner, vector vel, float howmany, float color, float gravityflag, float randomveljitter) te_particlecube = #408;
520 void(vector mincorner, vector maxcorner, vector vel, float howmany, float color) te_particlerain = #409;
521 void(vector mincorner, vector maxcorner, vector vel, float howmany, float color) te_particlesnow = #410;
522 void(vector org, vector vel, float howmany) te_spark = #411;
523 void(vector org) te_gunshotquad = #412;
524 void(vector org) te_spikequad = #413;
525 void(vector org) te_superspikequad = #414;
526 void(vector org) te_explosionquad = #415;
527 void(vector org) te_smallflash = #416;
528 void(vector org, float radius, float lifetime, vector color) te_customflash = #417;
529 void(vector org) te_gunshot = #418;
530 void(vector org) te_spike = #419;
531 void(vector org) te_superspike = #420;
532 void(vector org) te_explosion = #421;
533 void(vector org) te_tarexplosion = #422;
534 void(vector org) te_wizspike = #423;
535 void(vector org) te_knightspike = #424;
536 void(vector org) te_lavasplash = #425;
537 void(vector org) te_teleport = #426;
538 void(vector org, float colorstart, float colorlength) te_explosion2 = #427;
539 void(entity own, vector start, vector end) te_lightning1 = #428;
540 void(entity own, vector start, vector end) te_lightning2 = #429;
541 void(entity own, vector start, vector end) te_lightning3 = #430;
542 void(entity own, vector start, vector end) te_beam = #431;
543 void(vector dir) vectorvectors = #432;
544 void(vector org) te_plasmaburn = #433;
545 float(entity e, float s) getsurfacenumpoints = #434;
546 vector(entity e, float s, float n) getsurfacepoint = #435;
547 vector(entity e, float s) getsurfacenormal = #436;
548 string(entity e, float s) getsurfacetexture = #437;
549 float(entity e, vector p) getsurfacenearpoint = #438;
550 vector(entity e, float s, vector p) getsurfaceclippedpoint = #439;
552 float(string s) tokenize = #441;
553 string(float n) argv = #442;
554 void(entity e, entity tagentity, string tagname) setattachment = #443;
555 float(string pattern, float caseinsensitive, float quiet) search_begin = #444;
556 void(float handle) search_end = #445;
557 float(float handle) search_getsize = #446;
558 string(float handle, float num) search_getfilename = #447;
559 string(string s) cvar_string = #448;
560 entity(entity start, .float fld, float match) findflags = #449;
561 entity(.float fld, float match) findchainflags = #450;
562 float(entity ent, string tagname) gettagindex = #451;
563 vector(entity ent, float tagindex) gettaginfo = #452;
565 void(vector org, vector vel, float howmany) te_flamejet = #457;
567 entity(float num) entitybyindex = #459;
568 float() buf_create = #460;
569 void(float bufhandle) buf_del = #461;
570 float(float bufhandle) buf_getsize = #462;
571 void(float bufhandle_from, float bufhandle_to) buf_copy = #463;
572 void(float bufhandle, float sortpower, float backward) buf_sort = #464;
573 string(float bufhandle, string glue) buf_implode = #465;
574 string(float bufhandle, float string_index) bufstr_get = #466;
575 void(float bufhandle, float string_index, string str) bufstr_set = #467;
576 float(float bufhandle, string str, float order) bufstr_add = #468;
577 void(float bufhandle, float string_index) bufstr_free = #469;
579 float(float s) asin = #471;
580 float(float c) acos = #472;
581 float(float t) atan = #473;
582 float(float c, float s) atan2 = #474;
583 float(float a) tan = #475;
584 float(string s) strippedstringlen = #476;
585 float(string s) strlennocol = #476; // This is the correct name for the function, but not removing the decolorizedstring mapping.
586 string(string s) decolorizedstring = #477;
587 string(string s) strdecolorize = #477; // This is the correct name for the function, but not removing the decolorizedstring mapping.
588 string(float uselocaltime, string format, ...) strftime = #478;
589 float(string s) tokenizebyseparator = #479;
590 string(string s) strtolower = #480;
591 string(string s) strtoupper = #481;
592 string(string s) cvar_defstring = #482;
593 void(vector origin, string sample, float volume, float attenuation) pointsound = #483;
594 string(string search, string replace, string subject) strreplace = #484;
595 string(string search, string replace, string subject) strireplace = #485;
596 vector(entity e, float s, float n, float a) getsurfacepointattribute = #486;
598 float gecko_create( string name ) = #487;
599 void gecko_destroy( string name ) = #488;
600 void gecko_navigate( string name, string URI ) = #489;
601 float gecko_keyevent( string name, float key, float eventtype ) = #490;
602 void gecko_mousemove( string name, float x, float y ) = #491;
603 void gecko_resize( string name, float w, float h ) = #492;
604 vector gecko_get_texture_extent( string name ) = #493;
610 ==============================================================================
612 EXTENSION DEFINITIONS
614 ==============================================================================
617 // DP_CSQC_SPAWNPARTICLE
619 // darkplaces implementation: VorteX
620 // constant definitions:
621 // particle base behavior:
622 float PT_ALPHASTATIC = 1;
627 float PT_RAINDECAL = 6;
633 float PT_ENTITYPARTICLE = 12;
634 // particle blendtypes:
635 float PBLEND_ALPHA = 0;
636 float PBLEND_ADD = 1;
637 float PBLEND_INVMOD = 2;
638 // particle orientation:
639 float PARTICLE_BILLBOARD = 0;
640 float PARTICLE_SPARK = 1;
641 float PARTICLE_ORIENTED_DOUBLESIDED = 2;
642 float PARTICLE_BEAM = 3;
643 // global definitions:
644 float particle_type; // one of PT_
645 float particle_blendmode; // one of PBLEND_ values
646 float particle_orientation; // one of PARTICLE_ values
647 vector particle_color1;
648 vector particle_color2;
649 float particle_tex; // number of chunk in particlefont
651 float particle_sizeincrease;
652 float particle_alpha;
653 float particle_alphafade;
655 float particle_gravity;
656 float particle_bounce;
657 float particle_airfriction;
658 float particle_liquidfriction;
659 float particle_originjitter;
660 float particle_velocityjitter;
661 float particle_qualityreduction; // enable culling of this particle when FPS is low
662 float particle_stretch;
663 vector particle_staincolor1;
664 vector particle_staincolor2;
665 float particle_staintex;
666 float particle_stainalpha;
667 float particle_stainsize;
668 float particle_delayspawn;
669 float particle_delaycollision;
670 float particle_angle;
672 // builtin definitions:
673 float(float max_themes) initparticlespawner = #522; // check fields/globals for integration and enable particle spawner, return 1 is succeded, otherwise returns 0
674 void() resetparticle = #523; // reset p_ globals to default theme #0
675 void(float theme) particletheme = #524; // restore p_ globals from saved theme
676 float() particlethemesave = #525; // save p_ globals to new particletheme and return it's index
677 void(float theme) particlethemeupdate = #525; // save p_ globals to new particletheme and return it's index
678 void(float theme) particlethemefree = #526; // delete a particle theme
679 float(vector org, vector vel) spawnparticle = #527; // returns 0 when failed, 1 when spawned
680 float(vector org, vector vel, float theme) quickparticle = #527; // not reading globals, just theme, returns 0 when failed, 1 when spawned
681 float(vector org, vector vel, float delay, float collisiondelay) delayedparticle = #528;
682 float(vector org, vector vel, float delay, float collisiondelay, float theme) quickdelayedparticle = #528;
683 // description: this builtin provides an easy and flexible way to spawn particles,
684 // it is not created as replace for DP_SV_POINTPARTICLES but as an addition to it.
685 // With this extension you can create a specific particles like rain particles, or entity particles
687 // 1) 0 is default particle template, it could be changed
688 // 2) color vectors could have value 0-255 of each component
689 // restrictions: max themes could be between 4 and 2048
690 // warning: you should call initparticlespawner() at very beginning BEFORE all other particle spawner functions
691 // function to query particle info
692 // don't remove this function as it protects all particle_ globals from FTEQCC/FRIKQCC non-referenced removal optimisation
693 void() printparticle =
695 // vortex: this also protects from 'non-referenced' optimisation on some compilers
696 print("PARTICLE:\n");
697 print(strcat(" type: ", ftos(particle_type), "\n"));
698 print(strcat(" blendmode: ", ftos(particle_blendmode), "\n"));
699 print(strcat(" orientation: ", ftos(particle_orientation), "\n"));
700 print(strcat(" color1: ", vtos(particle_color1), "\n"));
701 print(strcat(" color2: ", vtos(particle_color2), "\n"));
702 print(strcat(" tex: ", ftos(particle_tex), "\n"));
703 print(strcat(" size: ", ftos(particle_size), "\n"));
704 print(strcat(" sizeincrease: ", ftos(particle_sizeincrease), "\n"));
705 print(strcat(" alpha: ", ftos(particle_alpha), "\n"));
706 print(strcat(" alphafade: ", ftos(particle_alphafade), "\n"));
707 print(strcat(" time: ", ftos(particle_time), "\n"));
708 print(strcat(" gravity: ", ftos(particle_gravity), "\n"));
709 print(strcat(" bounce: ", ftos(particle_bounce), "\n"));
710 print(strcat(" airfriction: ", ftos(particle_airfriction), "\n"));
711 print(strcat(" liquidfriction: ", ftos(particle_liquidfriction), "\n"));
712 print(strcat(" originjitter: ", ftos(particle_originjitter), "\n"));
713 print(strcat(" velocityjitter: ", ftos(particle_velocityjitter), "\n"));
714 print(strcat(" qualityreduction: ", ftos(particle_qualityreduction), "\n"));
715 print(strcat(" stretch: ", ftos(particle_stretch), "\n"));
716 print(strcat(" staincolor1: ", vtos(particle_staincolor1), "\n"));
717 print(strcat(" staincolor2: ", vtos(particle_staincolor2), "\n"));
718 print(strcat(" staintex: ", ftos(particle_staintex), "\n"));
719 print(strcat(" stainalpha: ", ftos(particle_stainalpha), "\n"));
720 print(strcat(" stainsize: ", ftos(particle_stainsize), "\n"));
721 print(strcat(" delayspawn: ", ftos(particle_delayspawn), "\n"));
722 print(strcat(" delaycollision: ", ftos(particle_delaycollision), "\n"));
723 print(strcat(" angle: ", ftos(particle_angle), "\n"));
724 print(strcat(" spin: ", ftos(particle_spin), "\n"));
727 // DP_CSQC_ENTITYTRANSPARENTSORTING_OFFSET
729 // darkplaces implementation: VorteX
730 float RF_USETRANSPARENTOFFSET = 64; // enables transparent origin offsetting
731 // global definitions
732 float transparent_offset; // should be set before entity is added
733 // description: offset a model's meshes origin used for transparent sorting. Could be used to tweak sorting bugs on very large transparent entities or hacking transparent sorting order for certain objects
734 // example: transparent_offset = 1000000; // entity always appear on background of other transparents
735 // note: offset is done in view forward axis
737 // DP_CSQC_ENTITYNOCULL
739 // darkplaces implementation: VorteX
740 const float RF_NOCULL = 128;
741 // description: when renderflag is set, engine will not use culling methods for this entity, e.g. it will always be drawn
742 // useful for large outdoor objects (like asteriods on sky horizont or sky models)
743 // also useful when culling is done at CSQC side
747 // darkplaces implementation: VorteX
748 // builtin definitions:
749 void(float ispaused) setpause = #531;
750 // description: provides ability to set pause in local games (similar to one set once console is activated)
751 // not stopping sound/cd track, useful for inventory screens, ingame menus with input etc.
753 // DP_CSQC_QUERYRENDERENTITY
755 // darkplaces implementation: VorteX
756 // constant definitions:
757 // render entity fields:
758 float E_ACTIVE = 0; // float 0/1
759 float E_ORIGIN = 1; // vector
760 float E_FORWARD = 2; // vector
761 float E_RIGHT = 3; // vector
762 float E_UP = 4; // vector
763 float E_SCALE = 5; // float
764 float E_ORIGINANDVECTORS = 6; // returns origin, + sets v_* vectors to orientation
765 float E_ALPHA = 7; // float
766 float E_COLORMOD = 8; // vector
767 float E_PANTSCOLOR = 9; // vector
768 float E_SHIRTCOLOR = 10; // vector
769 float E_SKIN = 11; // float
770 float E_MINS = 12; // vector
771 float E_MAXS = 13; // vector
772 float E_ABSMIN = 14; // vector
773 float E_ABSMAX = 15; // vector
774 float E_LIGHT = 16; // vector - modellight
775 // builtin definitions:
776 float(float entitynum, float fldnum) getentity = #504;
777 vector(float entitynum, float fldnum) getentityvec = #504;
778 // description: allows to query parms from render entities, especially useful with attaching CSQC ents to
779 // server entities networked and interpolated by engine (monsters, players), number of entity is it's SVQC number
780 // you can send it via tempentity/CSQC entity message. Note that this builtin doesnt know about entity removing/reallocating
781 // so it's meaning to work for short period of time, dont use it on missiles/grenades whatever will be removed next five seconds
784 //idea: Blub\0, divVerent
785 //darkplaces implementation: Blub\0
787 // loadfont fontname fontmaps size1 size2 ...
788 // A font can simply be gfx/tgafile (freetype fonts doent need extension),
789 // or alternatively you can specify multiple fonts and faces
790 // Like this: gfx/vera-sans:2,gfx/fallback:1
791 // to load face 2 of the font gfx/vera-sans and use face 1
792 // of gfx/fallback as fallback font
793 // You can also specify a list of font sizes to load, like this:
794 // loadfont console gfx/conchars,gfx/fallback 8 12 16 24 32
795 // In many cases, 8 12 16 24 32 should be a good choice.
797 //constant definitions:
798 float drawfont; // set it before drawstring()/drawchar() calls
799 float FONT_DEFAULT = 0; // 'default'
800 float FONT_CONSOLE = 1; // 'console', REALLY should be fixed width (ls!)
801 float FONT_SBAR = 2; // 'sbar', used on hud, must be fixed width
802 float FONT_NOTIFY = 3; // 'notify', used on sprint/bprint
803 float FONT_CHAT = 4; // 'chat'
804 float FONT_CENTERPRINT = 5;// 'centerprint'
805 float FONT_INFOBAR = 6; // 'infobar'
806 float FONT_MENU = 7; // 'menu', should be fixed width
807 float FONT_USER0 = 8; // 'user0', userdefined fonts
808 float FONT_USER1 = 9; // 'user1', userdefined fonts
809 float FONT_USER2 = 10; // 'user2', userdefined fonts
810 float FONT_USER3 = 11; // 'user3', userdefined fonts
811 float FONT_USER4 = 12; // 'user4', userdefined fonts
812 float FONT_USER5 = 13; // 'user5', userdefined fonts
813 float FONT_USER6 = 14; // 'user6', userdefined fonts
814 float FONT_USER7 = 15; // 'user7' slot, userdefined fonts
815 //builtin definitions:
816 float findfont(string s) = #356; // find font by fontname and return it's index
817 float loadfont(string fontname, string fontmaps, string sizes, float slot, float fix_scale, float fix_voffset) = #357;
818 // loads font immediately so stringwidth() function can be used just after builtin call
819 // returns a font slotnum (which is used to set drawfont to)
820 // first 3 parms are identical to "loadfont" console command ones
821 // slot could be one of FONT_ constants or result of findfont() or -1 to not use it
822 // if slot is given, font will be loaded to this slotnum and fontname become new title for it
823 // this way you can rename user* fonts to something more usable
824 // fix_* parms let you fix badly made fonts by applying some transformations to them
825 // fix_scale : per-character center-oriented scale (doesn't change line height at all)
826 // fix_voffset : vertical offset for each character, it's a multiplier to character height
827 float stringwidth(string text, float allowColorCodes, vector size) = #327; // get a width of string with given font and char size
828 float stringwidth_menu(string text, float allowColorCodes, vector size) = #468; // in menu.dat it has different builtin #
829 //description: engine support for custom fonts in console, hud, qc etc.
831 // max 128 chars for font name
832 // max 3 font fallbacks
833 // max 8 sizes per font
835 //DP_GFX_FONTS_FREETYPE
836 //idea: Blub\0, divVerent
837 //darkplaces implementation: Blub\0
839 // r_font_disable_freetype 0/1 : disable freetype fonts loading (uttetly disables freetype library initialization)
840 // r_font_antialias 0/1 : antialiasing when loading font
841 // r_font_hint 0/1/2/3 : hinting when loading font, 0 is no hinting, 1 light autohinting , 2 full autohinting, 3 full hinting
842 // r_font_postprocess_blur X : font outline blur amount
843 // r_font_postprocess_outline X : font outline width
844 // r_font_postprocess_shadow_x X : font outline shadow x shift amount, applied during outlining
845 // r_font_postprocess_shadow_y X : font outline shadow y shift amount, applied during outlining
846 // r_font_postprocess_shadow_z X : font outline shadow z shift amount, applied during blurring
847 //description: engine support for truetype/freetype fonts
848 //so .AFM+.PFB/.OTF/.TTF files could be stuffed as fontmaps in loadfont()
849 //(console command version will support them as well)
852 //idea: daemon, motorsep
853 //darkplaces implementation: divVerent
854 //builtin definitions:
855 string(float key, float bindmap) getkeybind_bindmap = #342;
856 float(float key, string bind, float bindmap) setkeybind_bindmap = #630;
857 vector(void) getbindmaps = #631;
858 float(vector bm) setbindmaps = #632;
859 string(string command, float bindmap) findkeysforcommand = #610;
860 //<already in EXT_CSQC> float(string key) stringtokeynum = #341;
861 //<already in EXT_CSQC> string(float keynum) keynumtostring = #340;
862 //description: key bind setting/getting including support for switchable
867 //darkplaces implementation: divVerent
868 //builtin definitions: (CSQC)
869 float(string url, float id, string content_type, string delim, float buf, float keyid) crypto_uri_postbuf = #513;
871 //use -1 as buffer handle to justs end delim as postdata