mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
create prototypes and linkages for all the server builtins, both nq and qw
This commit is contained in:
parent
0ebaa9834b
commit
118fc4b3ef
36 changed files with 310 additions and 81 deletions
|
@ -5,11 +5,7 @@ QCPPFLAGS=-I../include
|
|||
game_source = \
|
||||
axe.r \
|
||||
gameent.r \
|
||||
message.r \
|
||||
sound.r \
|
||||
tempent.r \
|
||||
trace.r \
|
||||
vector.r \
|
||||
world.r
|
||||
|
||||
game_obj = $(addsuffix .qfo,$(basename $(game_source)))
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
#include "message.h"
|
||||
|
||||
void(float to, float f) WriteByte = #52;
|
||||
void(float to, float f) WriteChar = #53;
|
||||
void(float to, float f) WriteShort = #54;
|
||||
void(float to, float f) WriteLong = #55;
|
||||
void(float to, float f) WriteCoord = #56;
|
||||
void(float to, float f) WriteAngle = #57;
|
||||
void(float to, string s) WriteString = #58;
|
||||
void(float to, entity s) WriteEntity = #59;
|
||||
// sends the temp message to a set of clients, possibly in PVS or PHS
|
||||
void(vector where, float set) multicast = #82;
|
|
@ -1,3 +0,0 @@
|
|||
#include "sound.h"
|
||||
|
||||
void(entity e, float chan, string samp, float vol, float atten) sound = #0;
|
|
@ -1,17 +0,0 @@
|
|||
#ifndef __trace_h
|
||||
#define __trace_h
|
||||
|
||||
// set by traceline / tracebox
|
||||
@extern float trace_allsolid;
|
||||
@extern float trace_startsolid;
|
||||
@extern float trace_fraction;
|
||||
@extern vector trace_endpos;
|
||||
@extern vector trace_plane_normal;
|
||||
@extern float trace_plane_dist;
|
||||
@extern entity trace_ent;
|
||||
@extern float trace_inopen;
|
||||
@extern float trace_inwater;
|
||||
|
||||
@extern void(vector v1, vector v2, float nomonsters, entity forent) traceline;
|
||||
|
||||
#endif//__trace_h
|
|
@ -1,14 +0,0 @@
|
|||
#include "trace.h"
|
||||
|
||||
// set by traceline / tracebox
|
||||
float trace_allsolid;
|
||||
float trace_startsolid;
|
||||
float trace_fraction;
|
||||
vector trace_endpos;
|
||||
vector trace_plane_normal;
|
||||
float trace_plane_dist;
|
||||
entity trace_ent;
|
||||
float trace_inopen;
|
||||
float trace_inwater;
|
||||
|
||||
void(vector v1, vector v2, float nomonsters, entity forent) traceline = #0;
|
|
@ -1,7 +0,0 @@
|
|||
#ifndef __vector_h
|
||||
#define __vector_h
|
||||
|
||||
@extern vector v_forward, v_up, v_right; // set by makevectors()
|
||||
@extern void(vector ang) makevectors;
|
||||
|
||||
#endif//__vector_h
|
|
@ -1,5 +0,0 @@
|
|||
#include "vector.h"
|
||||
|
||||
vector v_forward, v_up, v_right; // set by makevectors()
|
||||
void(vector ang) makevectors = #0;
|
||||
|
11
ruamoko/include/crudefile.h
Normal file
11
ruamoko/include/crudefile.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef __crudefile_h
|
||||
#define __crudefile_h
|
||||
|
||||
@extern float (string path, string mode) cfopen;
|
||||
@extern void (float desc) cfclose;
|
||||
@extern string (float desc) cfread;
|
||||
@extern float (float desc, string buf) cfwrite;
|
||||
@extern float (float desc) cfeof;
|
||||
@extern float () cfquota;
|
||||
|
||||
#endif//__crudefile_h
|
13
ruamoko/include/debug.h
Normal file
13
ruamoko/include/debug.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#ifndef __debug_h
|
||||
#define __debug_h
|
||||
|
||||
//FIXME@extern void () break;
|
||||
@extern void (string e) error;
|
||||
@extern void (string e) objerror;
|
||||
@extern void (string s) dprint;
|
||||
@extern void () coredump;
|
||||
@extern void () traceon;
|
||||
@extern void () traceoff;
|
||||
@extern void (entity e) eprint;
|
||||
|
||||
#endif//__debug_h
|
|
@ -16,4 +16,15 @@
|
|||
-(entity)ent;
|
||||
@end
|
||||
|
||||
@extern void (entity e, vector o) setorigin;
|
||||
@extern void (entity e, string m) setmodel;
|
||||
@extern void (entity e, vector min, vector max) setsize;
|
||||
@extern entity () spawn;
|
||||
@extern void (entity e) remove;
|
||||
@extern entity (entity start, .string fld, string match) find;
|
||||
@extern entity (vector org, float rad) findradius;
|
||||
@extern entity (entity e) nextent;
|
||||
@extern void (entity e) makestatic;
|
||||
@extern void (entity e) setspawnparms;
|
||||
|
||||
#endif//__rua_entity_h
|
||||
|
|
7
ruamoko/include/infokey.h
Normal file
7
ruamoko/include/infokey.h
Normal file
|
@ -0,0 +1,7 @@
|
|||
#ifndef __infokey_h
|
||||
#define __infokey_h
|
||||
|
||||
@extern string (entity e, string key) infokey;
|
||||
@extern void (entity ent, string key, string value) setinfokey;
|
||||
|
||||
#endif//__infokey_h
|
19
ruamoko/include/math.h
Normal file
19
ruamoko/include/math.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
#ifndef __math_h
|
||||
#define __math_h
|
||||
|
||||
@extern vector v_forward, v_up, v_right;
|
||||
|
||||
@extern void (entity e) makevectors;
|
||||
@extern float () random;
|
||||
@extern integer (float f) ftoi;
|
||||
@extern float (integer i) itof;
|
||||
@extern vector (vector v) normalize;
|
||||
@extern float (vector v) vlen;
|
||||
@extern float (vector v) vectoyaw;
|
||||
@extern float (float v) rint;
|
||||
@extern float (float v) floor;
|
||||
@extern float (float v) ceil;
|
||||
@extern float (float f) fabs;
|
||||
@extern vector (vector v) vectoangles;
|
||||
|
||||
#endif//__math_h
|
|
@ -34,18 +34,15 @@
|
|||
#define MULTICAST_PHS_R 4
|
||||
#define MULTICAST_PVS_R 5
|
||||
|
||||
//
|
||||
// direct client message generation
|
||||
//
|
||||
@extern void(float to, float f) WriteByte;
|
||||
@extern void(float to, float f) WriteChar;
|
||||
@extern void(float to, float f) WriteShort;
|
||||
@extern void(float to, float f) WriteLong;
|
||||
@extern void(float to, float f) WriteCoord;
|
||||
@extern void(float to, float f) WriteAngle;
|
||||
@extern void(float to, string s) WriteString;
|
||||
@extern void(float to, entity s) WriteEntity;
|
||||
|
||||
@extern void(vector where, float set) multicast;
|
||||
@extern void (string s) bprint;
|
||||
@extern void (float to, float f) WriteByte;
|
||||
@extern void (float to, float f) WriteChar;
|
||||
@extern void (float to, float f) WriteShort;
|
||||
@extern void (float to, float f) WriteLong;
|
||||
@extern void (float to, float f) WriteCoord;
|
||||
@extern void (float to, float f) WriteAngle;
|
||||
@extern void (float to, string s) WriteString;
|
||||
@extern void (float to, entity s) WriteEntity;
|
||||
@extern void (...) centerprint;
|
||||
|
||||
#endif//__message_h
|
6
ruamoko/include/nq_message.h
Normal file
6
ruamoko/include/nq_message.h
Normal file
|
@ -0,0 +1,6 @@
|
|||
#ifndef __nq_message_h
|
||||
#define __nq_message_h
|
||||
|
||||
@extern void (vector o, vector d, float color, float count) particle;
|
||||
|
||||
#endif//__nq_message_h
|
30
ruamoko/include/physics.h
Normal file
30
ruamoko/include/physics.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
#ifndef __physics_h
|
||||
#define __physics_h
|
||||
|
||||
@extern float trace_allsolid;
|
||||
@extern float trace_startsolid;
|
||||
@extern float trace_fraction;
|
||||
@extern vector trace_endpos;
|
||||
@extern vector trace_plane_normal;
|
||||
@extern float trace_plane_dist;
|
||||
@extern entity trace_ent;
|
||||
@extern float trace_inopen;
|
||||
@extern float trace_inwater;
|
||||
|
||||
@extern float (vector v1, vector v2, float tryents) traceline;
|
||||
@extern entity () checkclient;
|
||||
@extern float (float yaw, float dist) walkmove;
|
||||
@extern float () droptofloor;
|
||||
@extern void (float style, string value) lightstyle;
|
||||
@extern float (entity e) checkbottom;
|
||||
@extern float (vector v) pointcontents;
|
||||
@extern vector (entity e, float speed) aim;
|
||||
@extern void () ChangeYaw;
|
||||
@extern void (float step) movetogoal;
|
||||
@extern integer (entity ent, vector point) hullpointcontents;
|
||||
@extern vector (integer hull, integer max) getboxbounds;
|
||||
@extern integer () getboxhull;
|
||||
@extern void (integer hull) freeboxhull;
|
||||
@extern void (integer hull, vector right, vector forward, vector up, vector mins, vector maxs) rotate_bbox;
|
||||
|
||||
#endif//__physics_h
|
6
ruamoko/include/qw_message.h
Normal file
6
ruamoko/include/qw_message.h
Normal file
|
@ -0,0 +1,6 @@
|
|||
#ifndef __qw_message_h
|
||||
#define __qw_message_h
|
||||
|
||||
@extern void (vector where, float set) multicast;
|
||||
|
||||
#endif//__qw_message_h
|
7
ruamoko/include/qw_physics.h
Normal file
7
ruamoko/include/qw_physics.h
Normal file
|
@ -0,0 +1,7 @@
|
|||
#ifndef __qw_physics_h
|
||||
#define __qw_physics_h
|
||||
|
||||
@extern entity (entity ent) testentitypos;
|
||||
@extern void (vector start, vector mins, vector maxs, vector end, float type, entity passent) checkmove;
|
||||
|
||||
#endif//__qw_physics_h
|
6
ruamoko/include/qw_sys.h
Normal file
6
ruamoko/include/qw_sys.h
Normal file
|
@ -0,0 +1,6 @@
|
|||
#ifndef __qw_sys_h
|
||||
#define __qw_sys_h
|
||||
|
||||
@extern void (entity killer, entity killee) logfrag;
|
||||
|
||||
#endif//__qw_sys_h
|
|
@ -13,6 +13,7 @@
|
|||
#define ATTN_IDLE 2
|
||||
#define ATTN_STATIC 3
|
||||
|
||||
@extern void(entity e, float chan, string samp, float vol, float atten) sound;
|
||||
@extern void (entity e, float chan, string samp) sound;
|
||||
@extern void (vector pos, string samp, float vol, float atten) ambientsound;
|
||||
|
||||
#endif
|
||||
#endif//__sound_h
|
15
ruamoko/include/string.h
Normal file
15
ruamoko/include/string.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#ifndef __string_h
|
||||
#define __string_h
|
||||
|
||||
@extern void (entity client, string s) sprint;
|
||||
@extern string (float f) ftos;
|
||||
@extern string (vector v) vtos;
|
||||
@extern float (string s) stof;
|
||||
@extern float (string s) strlen;
|
||||
@extern float (string goal, string s) charcount;
|
||||
@extern string (...) sprintf;
|
||||
@extern string (integer i) itos;
|
||||
@extern integer (string s) stoi;
|
||||
@extern vector (string s) stov;
|
||||
|
||||
#endif//__string_h
|
18
ruamoko/include/system.h
Normal file
18
ruamoko/include/system.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
#ifndef __system_h
|
||||
#define __system_h
|
||||
|
||||
@extern void (string s) precache_sound;
|
||||
@extern void (string s) precache_model;
|
||||
@extern void (entity client, string s) stuffcmd;
|
||||
@extern float (string s) cvar;
|
||||
@extern void (string s) localcmd;
|
||||
@extern void (string s) changelevel;
|
||||
@extern void (string var, string val) cvar_set;
|
||||
@extern string (string s) precache_file;
|
||||
@extern string (string s) precache_model2;
|
||||
@extern string (string s) precache_sound2;
|
||||
@extern string (string s) precache_file2;
|
||||
@extern float () checkextension;
|
||||
@extern string () gametype;
|
||||
|
||||
#endif//__system_h
|
|
@ -3,8 +3,21 @@ QCFLAGS=-qq -g -Werror
|
|||
QCPPFLAGS=-I../include
|
||||
|
||||
libr_source = \
|
||||
entity.r \
|
||||
object.r
|
||||
crudefile.r \
|
||||
debug.r \
|
||||
entity.r \
|
||||
infokey.r \
|
||||
math.r \
|
||||
message.r \
|
||||
nq_message.r \
|
||||
object.r \
|
||||
physics.r \
|
||||
qw_message.r \
|
||||
qw_physics.r \
|
||||
qw_sys.r \
|
||||
sound.r \
|
||||
string.r \
|
||||
system.r
|
||||
|
||||
libr_obj = $(addsuffix .qfo,$(basename $(libr_source)))
|
||||
libr_dep = $(addprefix .deps/,$(addsuffix .d,$(basename $(libr_source))))
|
||||
|
|
8
ruamoko/lib/crudefile.r
Normal file
8
ruamoko/lib/crudefile.r
Normal file
|
@ -0,0 +1,8 @@
|
|||
#include "crudefile.h"
|
||||
|
||||
float (string path, string mode) cfopen = #103;
|
||||
void (float desc) cfclose = #104;
|
||||
string (float desc) cfread = #105;
|
||||
float (float desc, string buf) cfwrite = #106;
|
||||
float (float desc) cfeof = #107;
|
||||
float () cfquota = #108;
|
10
ruamoko/lib/debug.r
Normal file
10
ruamoko/lib/debug.r
Normal file
|
@ -0,0 +1,10 @@
|
|||
#include "debug.h"
|
||||
|
||||
//FIXME void () break = #6;
|
||||
void (string e) error = #10;
|
||||
void (string e) objerror = #11;
|
||||
void (string s) dprint = #25;
|
||||
void () coredump = #28;
|
||||
void () traceon = #29;
|
||||
void () traceoff = #30;
|
||||
void (entity e) eprint = #31;
|
|
@ -1,7 +1,15 @@
|
|||
#include "entity.h"
|
||||
|
||||
entity () spawn = #0;
|
||||
void (entity e) remove = #0;
|
||||
void (entity e, vector o) setorigin = #2;
|
||||
void (entity e, string m) setmodel = #3;
|
||||
void (entity e, vector min, vector max) setsize = #4;
|
||||
entity () spawn = #14;
|
||||
void (entity e) remove = #15;
|
||||
entity (entity start, .string fld, string match) find = #18;
|
||||
entity (vector org, float rad) findradius = #22;
|
||||
entity (entity e) nextent = #47;
|
||||
void (entity e) makestatic = #69;
|
||||
void (entity e) setspawnparms = #78;
|
||||
|
||||
@implementation Entity
|
||||
-init
|
||||
|
|
4
ruamoko/lib/infokey.r
Normal file
4
ruamoko/lib/infokey.r
Normal file
|
@ -0,0 +1,4 @@
|
|||
#include "infokey.h"
|
||||
|
||||
string (entity e, string key) infokey = #80;
|
||||
void (entity ent, string key, string value) setinfokey = #102;
|
16
ruamoko/lib/math.r
Normal file
16
ruamoko/lib/math.r
Normal file
|
@ -0,0 +1,16 @@
|
|||
#include "math.h"
|
||||
|
||||
vector v_forward, v_up, v_right;
|
||||
|
||||
void (entity e) makevectors = #1;
|
||||
float () random = #7;
|
||||
integer (float f) ftoi = #110;
|
||||
float (integer i) itof = #111;
|
||||
vector (vector v) normalize = #9;
|
||||
float (vector v) vlen = #12;
|
||||
float (vector v) vectoyaw = #13;
|
||||
float (float v) rint = #36;
|
||||
float (float v) floor = #37;
|
||||
float (float v) ceil = #38;
|
||||
float (float f) fabs = #43;
|
||||
vector (vector v) vectoangles = #51;
|
12
ruamoko/lib/message.r
Normal file
12
ruamoko/lib/message.r
Normal file
|
@ -0,0 +1,12 @@
|
|||
#include "message.h"
|
||||
|
||||
void (string s) bprint = #23;
|
||||
void (float to, float f) WriteByte = #52;
|
||||
void (float to, float f) WriteChar = #53;
|
||||
void (float to, float f) WriteShort = #54;
|
||||
void (float to, float f) WriteLong = #55;
|
||||
void (float to, float f) WriteCoord = #56;
|
||||
void (float to, float f) WriteAngle = #57;
|
||||
void (float to, string s) WriteString = #58;
|
||||
void (float to, entity s) WriteEntity = #59;
|
||||
void (...) centerprint = #73;
|
3
ruamoko/lib/nq_message.r
Normal file
3
ruamoko/lib/nq_message.r
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "nq_message.h"
|
||||
|
||||
void (vector o, vector d, float color, float count) particle = #48;
|
29
ruamoko/lib/physics.r
Normal file
29
ruamoko/lib/physics.r
Normal file
|
@ -0,0 +1,29 @@
|
|||
#include "physics.h"
|
||||
|
||||
float trace_allsolid;
|
||||
float trace_startsolid;
|
||||
float trace_fraction;
|
||||
vector trace_endpos;
|
||||
vector trace_plane_normal;
|
||||
float trace_plane_dist;
|
||||
entity trace_ent;
|
||||
float trace_inopen;
|
||||
float trace_inwater;
|
||||
|
||||
void(vector v1, vector v2, float nomonsters, entity forent) traceline = #0;
|
||||
|
||||
float (vector v1, vector v2, float tryents) traceline = #16;
|
||||
entity () checkclient = #17;
|
||||
float (float yaw, float dist) walkmove = #32;
|
||||
float () droptofloor = #34;
|
||||
void (float style, string value) lightstyle = #35;
|
||||
float (entity e) checkbottom = #40;
|
||||
float (vector v) pointcontents = #41;
|
||||
vector (entity e, float speed) aim = #44;
|
||||
void () ChangeYaw = #49;
|
||||
void (float step) movetogoal = #67;
|
||||
integer (entity ent, vector point) hullpointcontents = #93;
|
||||
vector (integer hull, integer max) getboxbounds = #94;
|
||||
integer () getboxhull = #95;
|
||||
void (integer hull) freeboxhull = #96;
|
||||
void (integer hull, vector right, vector forward, vector up, vector mins, vector maxs) rotate_bbox = #97;
|
3
ruamoko/lib/qw_message.r
Normal file
3
ruamoko/lib/qw_message.r
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "qw_message.h"
|
||||
|
||||
void (vector where, float set) multicast = #82;
|
4
ruamoko/lib/qw_physics.r
Normal file
4
ruamoko/lib/qw_physics.r
Normal file
|
@ -0,0 +1,4 @@
|
|||
#include "qw_physics.h"
|
||||
|
||||
entity (entity ent) testentitypos = #92;
|
||||
void (vector start, vector mins, vector maxs, vector end, float type, entity passent) checkmove = #98;
|
3
ruamoko/lib/qw_sys.r
Normal file
3
ruamoko/lib/qw_sys.r
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "qw_sys.h"
|
||||
|
||||
void (entity killer, entity killee) logfrag = #79;
|
4
ruamoko/lib/sound.r
Normal file
4
ruamoko/lib/sound.r
Normal file
|
@ -0,0 +1,4 @@
|
|||
#include "sound.h"
|
||||
|
||||
void (entity e, float chan, string samp) sound = #8;
|
||||
void (vector pos, string samp, float vol, float atten) ambientsound = #74;
|
12
ruamoko/lib/string.r
Normal file
12
ruamoko/lib/string.r
Normal file
|
@ -0,0 +1,12 @@
|
|||
#include "string.h"
|
||||
|
||||
void (entity client, string s) sprint = #24;
|
||||
string (float f) ftos = #26;
|
||||
string (vector v) vtos = #27;
|
||||
float (string s) stof = #81;
|
||||
float (string s) strlen = #100;
|
||||
float (string goal, string s) charcount = #101;
|
||||
string (...) sprintf = #109;
|
||||
string (integer i) itos = #112;
|
||||
integer (string s) stoi = #113;
|
||||
vector (string s) stov = #114;
|
15
ruamoko/lib/system.r
Normal file
15
ruamoko/lib/system.r
Normal file
|
@ -0,0 +1,15 @@
|
|||
#include "system.h"
|
||||
|
||||
void (string s) precache_sound = #19;
|
||||
void (string s) precache_model = #20;
|
||||
void (entity client, string s) stuffcmd = #21;
|
||||
float (string s) cvar = #45;
|
||||
void (string s) localcmd = #46;
|
||||
void (string s) changelevel = #70;
|
||||
void (string var, string val) cvar_set = #72;
|
||||
string (string s) precache_file = #68;
|
||||
string (string s) precache_model2 = #75;
|
||||
string (string s) precache_sound2 = #76;
|
||||
string (string s) precache_file2 = #77;
|
||||
float () checkextension = #99;
|
||||
string () gametype = #115;
|
Loading…
Reference in a new issue