From cbdf36dd7f5762c1aceb3ae3042dac392c4c0808 Mon Sep 17 00:00:00 2001 From: esteel Date: Tue, 20 Jan 2009 14:00:29 +0000 Subject: [PATCH] the old CSQC code is no longer needed and in case people want to take a look at it, use svn :P git-svn-id: svn://svn.icculus.org/nexuiz/trunk@5621 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/client/old/csqc_builtins.h | 239 ------------------------- data/qcsrc/client/old/csqc_constants.h | 81 --------- data/qcsrc/client/old/defs.c | 153 ---------------- data/qcsrc/client/old/helpers.c | 20 --- data/qcsrc/client/old/main.c | 105 ----------- data/qcsrc/client/old/progs.src | 12 -- data/qcsrc/client/old/vars.h | 20 --- data/qcsrc/client/old/view.c | 29 --- 8 files changed, 659 deletions(-) delete mode 100644 data/qcsrc/client/old/csqc_builtins.h delete mode 100644 data/qcsrc/client/old/csqc_constants.h delete mode 100644 data/qcsrc/client/old/defs.c delete mode 100644 data/qcsrc/client/old/helpers.c delete mode 100644 data/qcsrc/client/old/main.c delete mode 100644 data/qcsrc/client/old/progs.src delete mode 100644 data/qcsrc/client/old/vars.h delete mode 100644 data/qcsrc/client/old/view.c diff --git a/data/qcsrc/client/old/csqc_builtins.h b/data/qcsrc/client/old/csqc_builtins.h deleted file mode 100644 index d80151d07..000000000 --- a/data/qcsrc/client/old/csqc_builtins.h +++ /dev/null @@ -1,239 +0,0 @@ -void (vector ang) makevectors = #1; -void(entity e, vector o) setorigin = #2; -void (entity e, string m) setmodel = #3; - -void () break = #6; -float () random = #7; -void (entity e, float chan, string samp, float vol, float atten) sound = #8; -vector (vector v) normalize = #9; -void (string e) error = #10; -void (string e) objerror = #11; -float (vector v) vlen = #12; -float (vector v) vectoyaw = #13; -entity () spawn = #14; -void (entity e) remove = #15; - -void (vector v1, vector v2, float nomonsters, entity forent) traceline = #16; - -entity (entity start, .string fld, string match) find = #18; -string (string s) precache_sound = #19; -string (string s) precache_model = #20; - -void (string s) dprint = #25; -string (float f) ftos = #26; -string (vector v) vtos = #27; -void () coredump = #28; -void () traceon = #29; -void () traceoff = #30; -void (entity e) eprint = #31; - -float (float v) rint = #36; -float (float v) floor = #37; -float (float v) ceil = #38; - -float (vector v) pointcontents = #41; -float (float f) fabs = #43; - -float (string s) cvar = #45; -void (string s, ...) localcmd = #46; -entity (entity e) nextent = #47; - -vector (vector v) vectoangles = #51; - -void (string var, string val) cvar_set = #72; - - -float() ReadByte = #360; -float() ReadChar = #361; -float() ReadShort = #362; -float() ReadLong = #363; -float() ReadCoord = #364; -float() ReadAngle = #365; -string() ReadString = #366; //warning: this returns a temporary! - -float(string s) stof = #81; - - -void (vector v1, vector min, vector max, vector v2, float nomonsters, entity forent) tracebox = #90; -float (string name, string value) registercvar = #93; - -entity (entity start, .entity fld, entity match) findentity = #98; -entity (entity start, .float fld, float match) findfloat = #98; - -float (string s) checkextension = #99; - -float (string filename, float mode) fopen = #110; -void (float fhandle) fclose = #111; -string (float fhandle) fgets = #112; -void (float fhandle, string s) fputs = #113; -float (string s) strlen = #114; -string (...) strcat = #115; -string (string s, float start, float length) substring = #116; -vector (string s) stov = #117; -string (string s) strzone = #118; -void (string s) strunzone = #119; - -void () R_ClearScene = #300; -void (float mask) R_AddEntities = #301; -void (entity e) R_AddEntity = #302; -float (float property, ...) R_SetView = #303; -void () R_RenderScene = #304; -void (vector org, float radius, vector rgb) R_AddDynamicLight = #305; -void () R_CalcRefDef = #306; - -vector (vector v) cs_unproject = #310; -vector (vector v) cs_project = #311; - -void drawline(float width, vector pos1, vector pos2, vector rgb, float alpha, float flags) = #315; -float iscachedpic(string name) = #316; -string precache_pic(string name, ...) = #317; -vector drawgetimagesize(string pic) = #318; -void freepic(string name) = #319; -float drawcharacter(vector position, float character, vector scale, vector rgb, float alpha, float flag) = #320; -float drawstring(vector position, string text, vector scale, vector rgb, float alpha, float flag) = #321; -float drawpic(vector position, string pic, vector size, vector rgb, float alpha, float flag) = #322; -float drawfill(vector position, vector size, vector rgb, float alpha, float flag) = #323; -void drawsetcliparea(float x, float y, float width, float height) = #324; -void drawresetcliparea(void) = #325; - - -float (float statnum) getstatf = #330; -float (float statnum) getstati = #331; -string (float statnum) getstats = #332; - -void (entity e, float i) setmodelindex = #333; -string (float i) modelnameforindex = #334; - -float(string efname) particleseffectforname = #335; -void(entity ent, float effectnum, vector start, vector end, ...) trailparticles = #336; -void (float efnum, vector org, vector vel, float countmultiplier) pointparticles = #337; - -void (string s, ...) cprint = #338; -void (string s, ...) print = #339; - -void (float scale) setsensitivityscale = #347; - - -void (float framenum) RetrieveMovementFrame = #345; -void () DefaultPlayerPhysics = #347; - -string (float playernum, string key) getplayerkey = #348; -void (string cmdname) registercmd = #352; -vector () getmousepos = #344; - -string (string s) uncolorstring = #170; - -float () playernum = #354; - -void (vector org, vector forward, vector right, vector up) setlistener = #351; - -float (vector start, vector end, float ignore, float csqcents) selecttraceline = #355; -float () isdemo = #349; -float () isserver = #350; - -void (float f) setwantsmousemove = #343; -string (float key) getkeybind = #342; -string (float f) chr = #78; - -vector (vector org) getlight = #92; - -entity (.string fld, string match) findchain = #402; -entity (.float fld, float match) findchainflags = #450; -entity (.entity fld, entity match) findchainentity = #403; -entity (.float fld, float match) findchainfloat = #403; -entity (entity start, .entity fld, float match) findflags = #449; - -float (string pattern, float caseinsensitive, float quiet) search_begin = #444; -void (float handle) search_end = #445; -float (float handle) search_getsize = #446; -string (float handle, float num) search_getfilename = #447; - - -float (entity e, float s) getsurfacenumpoints = #434; -vector (entity e, float s, float n) getsurfacepoint = #435; -vector (entity e, float s) getsurfacenormal = #436; -string (entity e, float s) getsurfacetexture = #437; -float (entity e, vector p) getsurfacenearpoint = #438; -vector (entity e, float s, vector p) getsurfaceclippedpoint = #439; - -float (float a, float b) min = #94; -float (float a, float b, float c) min3 = #94; -float (float a, float b, float c, float d) min4 = #94; -float (float a, float b, float c, float d, float e) min5 = #94; -float (float a, float b, float c, float d, float e, float f) min6 = #94; -float (float a, float b, float c, float d, float e, float f, float g) min7 = #94; -float (float a, float b, float c, float d, float e, float f, float g, float h) min8 = #94; -float (float a, float b) max = #95; -float (float a, float b, float c) max3 = #95; -float (float a, float b, float c, float d) max4 = #95; -float (float a, float b, float c, float d, float e) max5 = #95; -float (float a, float b, float c, float d, float e, float f) max6 = #95; -float (float a, float b, float c, float d, float e, float f, float g) max7 = #95; -float (float a, float b, float c, float d, float e, float f, float g, float h) max8 = #95; -float (float minimum, float val, float maximum) bound = #96; - -vector () randomvec = #91; - -float (float val) sin = #60; -float (float val) cos = #61; -float (float val) sqrt = #62; -float (float a, float b) pow = #97; - -void (vector org, string modelname, float startframe, float endframe, float framerate) effect = #404; - -void (vector org, vector velocity, float howmany) te_blood = #405; -void (vector mincorner, vector maxcorner, float explosionspeed, float howmany) te_bloodshower = #406; -void (vector org, float radius, float lifetime, vector color) te_customflash = #417; -void(vector org, vector color) te_explosionrgb = #407; -void(vector mincorner, vector maxcorner, vector vel, float howmany, float color, float gravityflag, float randomveljitter) te_particlecube = #408; -void(vector mincorner, vector maxcorner, vector vel, float howmany, float color) te_particlerain = #409; -void(vector mincorner, vector maxcorner, vector vel, float howmany, float color) te_particlesnow = #410; -void(vector org) te_plasmaburn = #433; -void(vector org) te_gunshotquad = #412; -void(vector org) te_spikequad = #413; -void(vector org) te_superspikequad = #414; -void(vector org) te_explosionquad = #415; -void(vector org) te_smallflash = #416; -void(vector org, vector vel, float howmany) te_spark = #411; - -void(vector org) te_gunshot = #418; -void(vector org) te_spike = #419; -void(vector org) te_superspike = #420; -void(vector org) te_explosion = #421; -void(vector org) te_tarexplosion = #422; -void(vector org) te_wizspike = #423; -void(vector org) te_knightspike = #424; -void(vector org) te_lavasplash = #425; -void(vector org) te_teleport = #426; -void(vector org, float color, float colorlength) te_explosion2 = #427; -void(entity own, vector start, vector end) te_lightning1 = #428; -void(entity own, vector start, vector end) te_lightning2 = #429; -void(entity own, vector start, vector end) te_lightning3 = #430; -void(entity own, vector start, vector end) te_beam = #431; - -float (entity ent, string tagname) gettagindex = #451; -vector (entity ent, float tagindex) gettaginfo = #452; - -float (string s) tokenize = #441; -string (float argnum) argv = #442; - -string (string s) cvar_string = #448; - -float () buf_create = #460; -void (float bufhandle) buf_del = #461; -float (float bufhandle) buf_getsize = #462; -void (float bufhandle_from, float bufhandle_to) buf_copy = #463; -void (float bufhandle, float sortpower, float backward) buf_sort = #464; -string (float bufhandle, string glue) buf_implode = #465; -string (float bufhandle, float string_index) bufstr_get = #466; -void (float bufhandle, float string_index, string str) bufstr_set = #467; -float (float bufhandle, string str, float order) bufstr_add = #468; -void (float bufhandle, float string_index) bufstr_free = #469; - -float () onground = #355; - -void(string texturename, ...) R_BeginPolygon = #306; -void(vector org, vector texcoords, vector rgb, float alpha) R_PolygonVertex = #307; -void() R_EndPolygon = #308; - -float(string s, float num) charindex = #356; diff --git a/data/qcsrc/client/old/csqc_constants.h b/data/qcsrc/client/old/csqc_constants.h deleted file mode 100644 index 5b49262c6..000000000 --- a/data/qcsrc/client/old/csqc_constants.h +++ /dev/null @@ -1,81 +0,0 @@ -const entity NULL = world; - -const float MASK_ENGINE = 1; -const float MASK_ENGINEVIEWMODELS = 2; -const float MASK_NORMAL = 4; - -const float RF_VIEWMODEL = 1; -const float RF_EXTERNALMODEL = 2; -const float RF_DEPTHHACK = 4; -const float RF_ADDATIVE = 8; -const float RF_USEAXIS = 16; - -const float VF_MIN = 1; //(vector) -const float VF_MIN_X = 2; //(float) -const float VF_MIN_Y = 3; //(float) -const float VF_SIZE = 4; //(vector) (viewport size) -const float VF_SIZE_Y = 5; //(float) -const float VF_SIZE_X = 6; //(float) -const float VF_VIEWPORT = 7; //(vector, vector) -const float VF_FOV = 8; //(vector) -const float VF_FOVX = 9; //(float) -const float VF_FOVY = 10; //(float) -const float VF_ORIGIN = 11; //(vector) -const float VF_ORIGIN_X = 12; //(float) -const float VF_ORIGIN_Y = 13; //(float) -const float VF_ORIGIN_Z = 14; //(float) -const float VF_ANGLES = 15; //(vector) -const float VF_ANGLES_X = 16; //(float) -const float VF_ANGLES_Y = 17; //(float) -const float VF_ANGLES_Z = 18; //(float) -const float VF_DRAWWORLD = 19; //(float) -const float VF_DRAWENGINESBAR = 20; //(float) -const float VF_DRAWCROSSHAIR = 21; //(float) - -const float VF_CL_VIEWANGLES = 33; //(vector) -const float VF_CL_VIEWANGLES_X = 34; //(float) -const float VF_CL_VIEWANGLES_Y = 35; //(float) -const float VF_CL_VIEWANGLES_Z = 36; //(float) - -const float STAT_HEALTH = 0; -const float STAT_WEAPONMODEL = 2; -const float STAT_AMMO = 3; -const float STAT_ARMOR = 4; -const float STAT_WEAPONFRAME = 5; -const float STAT_SHELLS = 6; -const float STAT_NAILS = 7; -const float STAT_ROCKETS = 8; -const float STAT_CELLS = 9; -const float STAT_ACTIVEWEAPON = 10; -const float STAT_ITEMS = 15; - -const float true = 1; -const float false = 0; - -const float EXTRA_LOW = -99999999; -const float EXTRA_HIGH = 99999999; - -const vector VEC_1 = '1 1 1'; -const vector VEC_0 = '0 0 0'; -const vector VEC_M1 = '-1 -1 -1'; - -const float M_PI = 3.14159265358979323846; - -vector VEC_HULL_MIN = '-16 -16 -24'; -vector VEC_HULL_MAX = '16 16 32'; - -const float EF_ADDITIVE = 32; -const float EF_BLUE = 64; -const float EF_FLAME = 1024; -const float EF_FULLBRIGHT = 512; -const float EF_NODEPTHTEST = 8192; -const float EF_NODRAW = 16; -const float EF_NOSHADOW = 4096; -const float EF_RED = 128; -const float EF_STARDUST = 2048; -const float EF_SELECTABLE = 16384; - -const float PFL_ONGROUND = 1; -const float PFL_CROUCH = 2; -const float PFL_DEAD = 4; -const float PFL_GIBBED = 8; diff --git a/data/qcsrc/client/old/defs.c b/data/qcsrc/client/old/defs.c deleted file mode 100644 index 979a2c0aa..000000000 --- a/data/qcsrc/client/old/defs.c +++ /dev/null @@ -1,153 +0,0 @@ -#pragma flag off fastarrays // make dp behave with new fteqcc versions. remove when dp bug with fteqcc fastarrays is fixed - - -//NOTE: THIS IS AN INTERFACE FILE. DO NOT EDIT. -//MODIFYING THIS FILE CAN RESULT IN CRC ERRORS. -//YOU HAVE BEEN WARNED. - -//feel free to look though. :) - - - - -#define CSQC 1 - -/* -============================================================================== - - SOURCE FOR GLOBALVARS_T C STRUCTURE - -============================================================================== -*/ - -// -// system globals -// -entity self; -entity other; -entity world; -float time; -float frametime; - -float player_localentnum; //the entnum -float player_localnum; //the playernum -float maxclients; //a constant filled in by the engine. gah, portability eh? - -float clientcommandframe; //player movement -float servercommandframe; //clientframe echoed off the server - -string mapname; - -// -// global variables set by built in functions -// -vector v_forward, v_up, v_right; // set by makevectors() - -// 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; - -// -// required prog functions -// -void() CSQC_Init; -void() CSQC_Shutdown; -float(float f, float t) CSQC_InputEvent; -void() CSQC_UpdateView; -void(string s) CSQC_ConsoleCommand; - - -//these fields are read and set by the default player physics -vector pmove_org; -vector pmove_vel; -vector pmove_mins; -vector pmove_maxs; -//retrieved from the current movement commands (read by player physics) -float input_timelength; -vector input_angles; -vector input_movevalues; //forwards, right, up. -float input_buttons; //attack, use, jump (default physics only uses jump) - -float movevar_gravity; -float movevar_stopspeed; -float movevar_maxspeed; -float movevar_spectatormaxspeed; //used by NOCLIP movetypes. -float movevar_accelerate; -float movevar_airaccelerate; -float movevar_wateraccelerate; -float movevar_friction; -float movevar_waterfriction; -float movevar_entgravity; //the local player's gravity field. Is a multiple (1 is the normal value) - -//================================================ -void end_sys_globals; // flag for structure dumping -//================================================ - -/* -============================================================================== - - SOURCE FOR ENTVARS_T C STRUCTURE - -============================================================================== -*/ - -// -// system fields (*** = do not set in prog code, maintained by C code) -// -.float modelindex; // *** model index in the precached list -.vector absmin, absmax; // *** origin + mins / maxs - -.float entnum; // *** the ent number as on the server -.float drawmask; -.void() predraw; - -.float movetype; -.float solid; - -.vector origin; // *** -.vector oldorigin; // *** -.vector velocity; -.vector angles; -.vector avelocity; - -.string classname; // spawn function -.string model; -.float frame; -.float skin; -.float effects; - -.vector mins, maxs; // bounding box extents reletive to origin -.vector size; // maxs - mins - -.void() touch; -.void() use; -.void() think; -.void() blocked; // for doors or plats, called when can't push other - -.float nextthink; - -.entity chain; - -.string netname; - -.entity enemy; - -.float flags; - -.float colormap; - -.entity owner; // who launched a missile - -//================================================ -void end_sys_fields; // flag for structure dumping -//================================================ - -.float alpha; -.float renderflags; diff --git a/data/qcsrc/client/old/helpers.c b/data/qcsrc/client/old/helpers.c deleted file mode 100644 index 3a49dd184..000000000 --- a/data/qcsrc/client/old/helpers.c +++ /dev/null @@ -1,20 +0,0 @@ -void RegisterCvar (string name, string defvalue, float save) -{ - if(registercvar(name, defvalue) && save) - localcmd("seta ", name, " ", cvar_string(name), "\n"); -} - -float DotProduct (vector x, vector y) -{ - // LordHavoc: why does this function exist? vec*vec in QC is dotproduct - return x*y; - //return (x_x*y_x + x_y*y_y + x_z*y_z); -} - -// dummy function to shut up compiler warnings -void foo() -{ - self.alpha = 0; - self.renderflags = 0; - self = NULL; -} diff --git a/data/qcsrc/client/old/main.c b/data/qcsrc/client/old/main.c deleted file mode 100644 index 2773bc797..000000000 --- a/data/qcsrc/client/old/main.c +++ /dev/null @@ -1,105 +0,0 @@ -void SysParms_UPDATE (void) -{ - float f; - - vid_width = cvar("vid_conwidth"); - vid_height = cvar("vid_conheight"); - makevectors(input_angles); - pl_view_forward = v_forward; - pl_view_right = v_right; - pl_view_up = v_up; - pl_xyspeed = floor(sqrt(pmove_vel_x*pmove_vel_x + pmove_vel_y*pmove_vel_y)); - - f = getstati(STAT_HEALTH); - spec = (f == -666); - if(f < 1 && !(player_flags & PFL_DEAD)) - player_flags |= PFL_DEAD; - else if(f >= 1 && player_flags & PFL_DEAD) - player_flags -= player_flags & (PFL_DEAD | PFL_GIBBED); -} - -void CSQC_Ent_Update (float isnew) -{ - float i; - i = ReadByte(); -} - -void CSQC_Ent_Remove () -{ - remove(self); -}; - - -void CSQC_Init (void) -{ -} - -void CSQC_Shutdown (void) -{ -} - -void CSQC_ConsoleCommand (string str) -{ -} - -void CSQC_UpdateView (void) -{ - SysParms_UPDATE(); - View_Update(); - - R_ClearScene(); - - R_SetView(VF_DRAWWORLD, 1); - - if(getstati(STAT_HEALTH) == 6666) - { - R_SetView(VF_DRAWCROSSHAIR, 0); - R_SetView(VF_DRAWENGINESBAR, 0); - } - else - { - R_SetView(VF_DRAWCROSSHAIR, 1); - R_SetView(VF_DRAWENGINESBAR, 1); - } - - R_AddEntities(MASK_NORMAL | MASK_ENGINE | MASK_ENGINEVIEWMODELS); - R_RenderScene(); - - if(cvar("cg_showvelocity")) - { - local float f; - local string s; - f = pl_xyspeed; - if(max_ups < f) - max_ups = f; - s = ftos(f); - s = strcat(s, " ups"); - drawstring('1 0 0'*vid_width + '-64 64 0', s, '8 8 0', VEC_1, 1, 0); - s = ftos(max_ups); - s = strcat(s, " max"); - drawstring('1 0 0'*vid_width + '-64 72 0', s, '8 8 0', VEC_1, 1, 0); - } -} - -float CSQC_InputEvent (float event, float parama) -{ - return false; -} - -void CSQC_Parse_StuffCmd (string msg) -{ - // doesn't work, dp obviously doesn't execute csprogs.dat on demo playback - if(isdemo() && msg == "menu_showteamselect\n") - return; - localcmd(msg); -} - -void CSQC_Parse_Print (string msg) -{ - print(msg); -} - -void CSQC_Parse_CenterPrint (string msg) -{ - cprint(msg); -} diff --git a/data/qcsrc/client/old/progs.src b/data/qcsrc/client/old/progs.src deleted file mode 100644 index 8f3778ca2..000000000 --- a/data/qcsrc/client/old/progs.src +++ /dev/null @@ -1,12 +0,0 @@ -../../csprogs.dat - -defs.c - -csqc_constants.h -csqc_builtins.h -vars.h - -helpers.c -view.c - -main.c diff --git a/data/qcsrc/client/old/vars.h b/data/qcsrc/client/old/vars.h deleted file mode 100644 index b50cb5a61..000000000 --- a/data/qcsrc/client/old/vars.h +++ /dev/null @@ -1,20 +0,0 @@ -float player_flags; -float spec; - -vector pl_view_forward; -vector pl_view_right; -vector pl_view_up; - -float pl_xyspeed; - -vector vieworg; - -float vid_width, vid_height; - -vector PL_VIEW_OFS = '0 0 35'; -vector PL_MIN = '-16 -16 -24'; -vector PL_MAX = '16 16 45'; -vector PL_CROUCH_VIEW_OFS = '0 0 15'; -vector PL_CROUCH_MIN = '-16 -16 -24'; -vector PL_CROUCH_MAX = '16 16 25'; - diff --git a/data/qcsrc/client/old/view.c b/data/qcsrc/client/old/view.c deleted file mode 100644 index 2131c36cf..000000000 --- a/data/qcsrc/client/old/view.c +++ /dev/null @@ -1,29 +0,0 @@ -float max_ups; -vector angle_alive; - -void View_Update (void) -{ - vieworg = pmove_org; - angle_alive = input_angles; - makevectors(input_angles); - - if(player_flags & PFL_DEAD && !spec) - { - R_SetView(VF_ORIGIN, vieworg+'0 0 4'); - angle_alive_z = 80; - R_SetView(VF_ANGLES, angle_alive); - R_SetView(VF_CL_VIEWANGLES, angle_alive); - return; - } - - if(input_buttons & 16 && !spec) - vieworg += PL_CROUCH_VIEW_OFS; - else - vieworg += PL_VIEW_OFS; - - if(cvar("chase_active") && !spec) - vieworg = vieworg + v_up * cvar("chase_up") - v_forward * cvar("chase_back"); - - R_SetView(VF_ORIGIN, vieworg); - R_SetView(VF_ANGLES, input_angles); -} -- 2.39.2