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