]> icculus.org git repositories - divverent/nexuiz.git/blob - data/qcsrc/menu/msys.qc
cmd info (something) prints the content of sv_info_(something), for server admins...
[divverent/nexuiz.git] / data / qcsrc / menu / msys.qc
1 #pragma flag off fastarrays // make dp behave with new fteqcc versions. remove when dp bug with fteqcc fastarrays is fixed
2 #define MENUQC // so common/*.qc can check for menu QC or game QC
3
4 //////////////////////////////////////////////////////////
5 // sys globals
6
7 entity self;
8
9 /////////////////////////////////////////////////////////
10 void            end_sys_globals;
11 /////////////////////////////////////////////////////////
12 // sys fields
13
14 /////////////////////////////////////////////////////////
15 void            end_sys_fields;
16 /////////////////////////////////////////////////////////
17 // sys functions
18
19 void() m_init;
20 void(float keynr, float ascii) m_keydown;
21 void() m_draw;
22 void() m_display;       // old NG Menu
23 void() m_toggle;
24 void() m_hide;          // old NG Menu
25 void() m_shutdown;
26
27 /////////////////////////////////////////////////////////
28 // sys constants
29 ///////////////////////////
30 // key constants
31
32 //
33 // these are the key numbers that should be passed to Key_Event
34 //
35 float K_TAB                     =       9;
36 float K_ENTER           =       13;
37 float K_ESCAPE          =       27;
38 float K_SPACE           =       32;
39
40 // normal keys should be passed as lowercased ascii
41
42 float K_BACKSPACE       =       127;
43 float K_UPARROW         =       128;
44 float K_DOWNARROW       =       129;
45 float K_LEFTARROW       =       130;
46 float K_RIGHTARROW      =       131;
47
48 float K_ALT             =       132;
49 float K_CTRL    =       133;
50 float K_SHIFT   =       134;
51 float K_F1              =       135;
52 float K_F2              =       136;
53 float K_F3              =       137;
54 float K_F4              =       138;
55 float K_F5              =       139;
56 float K_F6              =       140;
57 float K_F7              =       141;
58 float K_F8              =       142;
59 float K_F9              =       143;
60 float K_F10             =       144;
61 float K_F11             =       145;
62 float K_F12             =       146;
63 float K_INS             =       147;
64 float K_DEL             =       148;
65 float K_PGDN    =       149;
66 float K_PGUP    =       150;
67 float K_HOME    =       151;
68 float K_END             =       152;
69
70 float K_KP_HOME                 =       160;
71 float K_KP_UPARROW              =       161;
72 float K_KP_PGUP                 =       162;
73 float K_KP_LEFTARROW    =       163;
74 float K_KP_5                    =       164;
75 float K_KP_RIGHTARROW   =       165;
76 float K_KP_END                  =       166;
77 float K_KP_DOWNARROW    =       167;
78 float K_KP_PGDN                 =       168;
79 float K_KP_ENTER                =       169;
80 float K_KP_INS                  =       170;
81 float K_KP_DEL                  =       171;
82 float K_KP_SLASH                =       172;
83 float K_KP_MINUS                =       173;
84 float K_KP_PLUS                 =       174;
85
86 float K_PAUSE           =       255;
87
88 //
89 // joystick buttons
90 //
91 float K_JOY1            =       768;
92 float K_JOY2            =       769;
93 float K_JOY3            =       770;
94 float K_JOY4            =       771;
95
96 //
97 // aux keys are for multi-buttoned joysticks to generate so they can use
98 // the normal binding process
99 //
100 float K_AUX1            =       772;
101 float K_AUX2            =       773;
102 float K_AUX3            =       774;
103 float K_AUX4            =       775;
104 float K_AUX5            =       776;
105 float K_AUX6            =       777;
106 float K_AUX7            =       778;
107 float K_AUX8            =       779;
108 float K_AUX9            =       780;
109 float K_AUX10           =       781;
110 float K_AUX11           =       782;
111 float K_AUX12           =       783;
112 float K_AUX13           =       784;
113 float K_AUX14           =       785;
114 float K_AUX15           =       786;
115 float K_AUX16           =       787;
116 float K_AUX17           =       788;
117 float K_AUX18           =       789;
118 float K_AUX19           =       790;
119 float K_AUX20           =       791;
120 float K_AUX21           =       792;
121 float K_AUX22           =       793;
122 float K_AUX23           =       794;
123 float K_AUX24           =       795;
124 float K_AUX25           =       796;
125 float K_AUX26           =       797;
126 float K_AUX27           =       798;
127 float K_AUX28           =       799;
128 float K_AUX29           =       800;
129 float K_AUX30           =       801;
130 float K_AUX31           =       802;
131 float K_AUX32           =       803;
132
133 //
134 // mouse buttons generate virtual keys
135 //
136 float K_MOUSE1          =       512;
137 float K_MOUSE2          =       513;
138 float K_MOUSE3          =       514;
139 float K_MOUSE4          =       515;
140 float K_MOUSE5          =       516;
141 float K_MOUSE6          =       517;
142 float K_MOUSE7          =       518;
143 float K_MOUSE8          =       519;
144 float K_MOUSE9          =       520;
145 float K_MOUSE10         =       521;
146
147 float K_MWHEELDOWN      =       K_MOUSE4;
148 float K_MWHEELUP        =       K_MOUSE5;
149
150 ///////////////////////////
151 // key dest constants
152
153 float KEY_GAME          =       0;
154 float KEY_MENU          =       2;
155 float KEY_UNKNOWN       =       3;
156
157 ///////////////////////////
158 // file constants
159
160 float FILE_READ = 0;
161 float FILE_APPEND = 1;
162 float FILE_WRITE = 2;
163
164 ///////////////////////////
165 // logical constants (just for completeness)
166
167 float TRUE      = 1;
168 float FALSE = 0;
169
170 ///////////////////////////
171 // boolean constants
172
173 float true  = 1;
174 float false = 0;
175
176 ///////////////////////////
177 // msg constants
178
179 float MSG_BROADCAST             = 0;            // unreliable to all
180 float MSG_ONE                   = 1;            // reliable to one (msg_entity)
181 float MSG_ALL                   = 2;            // reliable to all
182 float MSG_INIT                  = 3;            // write to the init string
183
184 /////////////////////////////
185 // mouse target constants
186
187 float MT_MENU = 1;
188 float MT_CLIENT = 2;
189
190 /////////////////////////
191 // client state constants
192
193 float CS_DEDICATED              = 0;
194 float CS_DISCONNECTED   = 1;
195 float CS_CONNECTED              = 2;
196
197 ///////////////////////////
198 // blend flags
199
200 float DRAWFLAG_NORMAL           = 0;
201 float DRAWFLAG_ADDITIVE         = 1;
202 float DRAWFLAG_MODULATE         = 2;
203 float DRAWFLAG_2XMODULATE   = 3;
204
205
206 ///////////////////////////
207 // cvar constants
208
209 float CVAR_SAVE         = 1;
210 float CVAR_NOTIFY       = 2;
211 float CVAR_READONLY     = 4;
212
213 ///////////////////////////
214 // server list constants
215
216 float SLIST_HOSTCACHEVIEWCOUNT  = 0;
217 float SLIST_HOSTCACHETOTALCOUNT = 1;
218 float SLIST_MASTERQUERYCOUNT    = 2;
219 float SLIST_MASTERREPLYCOUNT    = 3;
220 float SLIST_SERVERQUERYCOUNT    = 4;
221 float SLIST_SERVERREPLYCOUNT    = 5;
222 float SLIST_SORTFIELD           = 6;
223 float SLIST_SORTDESCENDING      = 7;
224
225 float SLIST_LEGACY_LINE1        = 1024;
226 float SLIST_LEGACY_LINE2        = 1025;
227
228 float SLIST_TEST_CONTAINS       = 0;
229 float SLIST_TEST_NOTCONTAIN     = 1;
230 float SLIST_TEST_LESSEQUAL      = 2;
231 float SLIST_TEST_LESS           = 3;
232 float SLIST_TEST_EQUAL          = 4;
233 float SLIST_TEST_GREATER        = 5;
234 float SLIST_TEST_GREATEREQUAL   = 6;
235 float SLIST_TEST_NOTEQUAL       = 7;
236
237 float SLIST_MASK_AND = 0;
238 float SLIST_MASK_OR  = 512;
239
240 float NET_CURRENTPROTOCOL = 3;
241
242 ////////////////////////////////
243 // cinematic action constants
244
245 float CINE_PLAY         = 1;
246 float CINE_LOOP         = 2;
247 float CINE_PAUSE        = 3;
248 float CINE_FIRSTFRAME   = 4;
249 float CINE_RESETONWAKEUP= 5;
250
251 ///////////////////////////
252 // null entity (actually it is the same like the world entity)
253
254 entity null_entity;
255
256 ///////////////////////////
257 // error constants
258
259 // file handling
260 float ERR_CANNOTOPEN                    = -1; // fopen
261 float ERR_NOTENOUGHFILEHANDLES  = -2; // fopen
262 float ERR_INVALIDMODE                   = -3; // fopen
263 float ERR_BADFILENAME                   = -4; // fopen
264
265 // drawing functions
266
267 float ERR_NULLSTRING                    = -1;
268 float ERR_BADDRAWFLAG                   = -2;
269 float ERR_BADSCALE                      = -3;
270 float ERR_BADSIZE                       = ERR_BADSCALE;
271 float ERR_NOTCACHED                     = -4;
272
273 /* not supported at the moment
274 ///////////////////////////
275 // os constants
276
277 float OS_WINDOWS        = 0;
278 float OS_LINUX          = 1;
279 float OS_MAC            = 2;
280 */
281