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