]> icculus.org git repositories - divverent/nexuiz.git/blob - data/menuqc/msys.qc
lossless jpegoptim run saving about 10 megabytes
[divverent/nexuiz.git] / data / menuqc / msys.qc
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_MOUSE4          =       515;
139 float K_MOUSE5          =       516;
140 float K_MOUSE6          =       517;
141 float K_MOUSE7          =       518;
142 float K_MOUSE8          =       519;
143 float K_MOUSE9          =       520;
144 float K_MOUSE10         =       521;
145
146 float K_MWHEELDOWN      =       K_MOUSE4;
147 float K_MWHEELUP        =       K_MOUSE5;
148
149 ///////////////////////////
150 // key dest constants
151
152 float KEY_GAME          =       0;
153 float KEY_MENU          =       2;
154 float KEY_UNKNOWN       =       3;
155
156 ///////////////////////////
157 // file constants
158
159 float FILE_READ = 0;
160 float FILE_APPEND = 1;
161 float FILE_WRITE = 2;
162
163 ///////////////////////////
164 // logical constants (just for completeness)
165
166 float TRUE      = 1;
167 float FALSE = 0;
168
169 ///////////////////////////
170 // boolean constants
171
172 float true  = 1;
173 float false = 0;
174
175 ///////////////////////////
176 // msg constants
177
178 float MSG_BROADCAST             = 0;            // unreliable to all
179 float MSG_ONE                   = 1;            // reliable to one (msg_entity)
180 float MSG_ALL                   = 2;            // reliable to all
181 float MSG_INIT                  = 3;            // write to the init string
182
183 /////////////////////////////
184 // mouse target constants
185
186 float MT_MENU = 1;
187 float MT_CLIENT = 2;
188
189 /////////////////////////
190 // client state constants
191
192 float CS_DEDICATED              = 0;
193 float CS_DISCONNECTED   = 1;
194 float CS_CONNECTED              = 2;
195
196 ///////////////////////////
197 // blend flags
198
199 float DRAWFLAG_NORMAL           = 0;
200 float DRAWFLAG_ADDITIVE         = 1;
201 float DRAWFLAG_MODULATE         = 2;
202 float DRAWFLAG_2XMODULATE   = 3;
203
204
205 ///////////////////////////
206 // cvar constants
207
208 float CVAR_SAVE         = 1;
209 float CVAR_NOTIFY       = 2;
210 float CVAR_READONLY     = 4;
211
212 ///////////////////////////
213 // server list constants
214
215 float SLIST_HOSTCACHEVIEWCOUNT  = 0;
216 float SLIST_HOSTCACHETOTALCOUNT = 1;
217 float SLIST_MASTERQUERYCOUNT    = 2;
218 float SLIST_MASTERREPLYCOUNT    = 3;
219 float SLIST_SERVERQUERYCOUNT    = 4;
220 float SLIST_SERVERREPLYCOUNT    = 5;
221 float SLIST_SORTFIELD           = 6;
222 float SLIST_SORTDESCENDING      = 7;
223
224 float SLIST_LEGACY_LINE1        = 1024;
225 float SLIST_LEGACY_LINE2        = 1025;
226
227 float SLIST_TEST_CONTAINS       = 0;
228 float SLIST_TEST_NOTCONTAIN     = 1;
229 float SLIST_TEST_LESSEQUAL      = 2;
230 float SLIST_TEST_LESS           = 3;
231 float SLIST_TEST_EQUAL          = 4;
232 float SLIST_TEST_GREATER        = 5;
233 float SLIST_TEST_GREATEREQUAL   = 6;
234 float SLIST_TEST_NOTEQUAL       = 7;
235
236 float SLIST_MASK_AND = 0;
237 float SLIST_MASK_OR  = 512;
238
239 float NET_CURRENTPROTOCOL = 3;
240
241 ////////////////////////////////
242 // cinematic action constants
243
244 float CINE_PLAY         = 1;
245 float CINE_LOOP         = 2;
246 float CINE_PAUSE        = 3;
247 float CINE_FIRSTFRAME   = 4;
248 float CINE_RESETONWAKEUP= 5;
249
250 ///////////////////////////
251 // null entity (actually it is the same like the world entity)
252
253 entity null_entity;
254
255 ///////////////////////////
256 // error constants
257
258 // file handling
259 float ERR_CANNOTOPEN                    = -1; // fopen
260 float ERR_NOTENOUGHFILEHANDLES  = -2; // fopen
261 float ERR_INVALIDMODE                   = -3; // fopen
262 float ERR_BADFILENAME                   = -4; // fopen
263
264 // drawing functions
265
266 float ERR_NULLSTRING                    = -1;
267 float ERR_BADDRAWFLAG                   = -2;
268 float ERR_BADSCALE                      = -3;
269 float ERR_BADSIZE                       = ERR_BADSCALE;
270 float ERR_NOTCACHED                     = -4;
271
272 /* not supported at the moment
273 ///////////////////////////
274 // os constants
275
276 float OS_WINDOWS        = 0;
277 float OS_LINUX          = 1;
278 float OS_MAC            = 2;
279 */
280