From 900bb59265ce72c7f888fa87a02a0899df42a05b Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sat, 26 Nov 2011 11:37:51 +0100 Subject: [PATCH] fix more dpdefs stuff --- qcsrc/client/progs.src | 1 + qcsrc/common/constants.qh | 145 ----------------------------------- qcsrc/dpdefs/dpextensions.qc | 4 +- 3 files changed, 3 insertions(+), 147 deletions(-) diff --git a/qcsrc/client/progs.src b/qcsrc/client/progs.src index f650d04bd..5d2b5379a 100644 --- a/qcsrc/client/progs.src +++ b/qcsrc/client/progs.src @@ -4,6 +4,7 @@ pre.qh ../common/util-pre.qh Defs.qc csqc_constants.qc +../dpdefs/keycodes.qc ../common/constants.qh csqc_builtins.qc diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index 62975e53a..d838f09e2 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -136,151 +136,6 @@ const float RADARICON_DOMPOINT = 1; const float RADARICON_POWERUP = 1; const float RADARICON_TAGGED = 1; -/////////////////////////// -// key constants - -// -// these are the key numbers that should be passed to Key_Event -// -const float K_TAB = 9; -const float K_ENTER = 13; -const float K_ESCAPE = 27; -const float K_SPACE = 32; - -// normal keys should be passed as lowercased ascii - -const float K_BACKSPACE = 127; -const float K_UPARROW = 128; -const float K_DOWNARROW = 129; -const float K_LEFTARROW = 130; -const float K_RIGHTARROW = 131; - -const float K_ALT = 132; -const float K_CTRL = 133; -const float K_SHIFT = 134; - -const float K_F1 = 135; -const float K_F2 = 136; -const float K_F3 = 137; -const float K_F4 = 138; -const float K_F5 = 139; -const float K_F6 = 140; -const float K_F7 = 141; -const float K_F8 = 142; -const float K_F9 = 143; -const float K_F10 = 144; -const float K_F11 = 145; -const float K_F12 = 146; - -const float K_INS = 147; -const float K_DEL = 148; -const float K_PGDN = 149; -const float K_PGUP = 150; -const float K_HOME = 151; -const float K_END = 152; - -const float K_NUMLOCK = 154; -const float K_CAPSLOCK = 155; -const float K_SCROLLOCK = 156; - -const float K_KP_0 = 157; -const float K_KP_INS = K_KP_0; -const float K_KP_1 = 158; -const float K_KP_END = K_KP_1; -const float K_KP_2 = 159; -const float K_KP_DOWNARROW = K_KP_2; -const float K_KP_3 = 160; -const float K_KP_PGDN = K_KP_3; -const float K_KP_4 = 161; -const float K_KP_LEFTARROW = K_KP_4; -const float K_KP_5 = 162; -const float K_KP_6 = 163; -const float K_KP_RIGHTARROW = K_KP_6; -const float K_KP_7 = 164; -const float K_KP_HOME = K_KP_7; -const float K_KP_8 = 165; -const float K_KP_UPARROW = K_KP_8; -const float K_KP_9 = 166; -const float K_KP_PGUP = K_KP_9; -const float K_KP_PERIOD = 167; -const float K_KP_DEL = K_KP_PERIOD; -const float K_KP_DIVIDE = 168; -const float K_KP_SLASH = K_KP_DIVIDE; -const float K_KP_MULTIPLY = 169; -const float K_KP_MINUS = 170; -const float K_KP_PLUS = 171; -const float K_KP_ENTER = 172; -const float K_KP_EQUALS = 173; - -const float K_PAUSE = 153; - -// -// joystick buttons -// -const float K_JOY1 = 768; -const float K_JOY2 = 769; -const float K_JOY3 = 770; -const float K_JOY4 = 771; - -// -// aux keys are for multi-buttoned joysticks to generate so they can use -// the normal binding process -// -const float K_AUX1 = 772; -const float K_AUX2 = 773; -const float K_AUX3 = 774; -const float K_AUX4 = 775; -const float K_AUX5 = 776; -const float K_AUX6 = 777; -const float K_AUX7 = 778; -const float K_AUX8 = 779; -const float K_AUX9 = 780; -const float K_AUX10 = 781; -const float K_AUX11 = 782; -const float K_AUX12 = 783; -const float K_AUX13 = 784; -const float K_AUX14 = 785; -const float K_AUX15 = 786; -const float K_AUX16 = 787; -const float K_AUX17 = 788; -const float K_AUX18 = 789; -const float K_AUX19 = 790; -const float K_AUX20 = 791; -const float K_AUX21 = 792; -const float K_AUX22 = 793; -const float K_AUX23 = 794; -const float K_AUX24 = 795; -const float K_AUX25 = 796; -const float K_AUX26 = 797; -const float K_AUX27 = 798; -const float K_AUX28 = 799; -const float K_AUX29 = 800; -const float K_AUX30 = 801; -const float K_AUX31 = 802; -const float K_AUX32 = 803; - -// -// mouse buttons generate virtual keys -// -const float K_MOUSE1 = 512; -const float K_MOUSE2 = 513; -const float K_MOUSE3 = 514; -const float K_MWHEELUP = 515; -const float K_MWHEELDOWN = 516; -const float K_MOUSE4 = 517; -const float K_MOUSE5 = 518; -const float K_MOUSE6 = 519; -const float K_MOUSE7 = 520; -const float K_MOUSE8 = 521; -const float K_MOUSE9 = 522; -const float K_MOUSE10 = 523; -const float K_MOUSE11 = 524; -const float K_MOUSE12 = 525; -const float K_MOUSE13 = 526; -const float K_MOUSE14 = 527; -const float K_MOUSE15 = 528; -const float K_MOUSE16 = 529; - /////////////////////////// // keys pressed const float KEY_FORWARD = 1; diff --git a/qcsrc/dpdefs/dpextensions.qc b/qcsrc/dpdefs/dpextensions.qc index 8d2148843..9f2911a19 100644 --- a/qcsrc/dpdefs/dpextensions.qc +++ b/qcsrc/dpdefs/dpextensions.qc @@ -943,14 +943,14 @@ float log(float f) = #532; //idea: LordHavoc //darkplaces implementation: LordHavoc //builtin definitions: -float(float a, float b) min = #94; +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, ...) 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; -- 2.39.2