]> icculus.org git repositories - divverent/nexuiz.git/blob - data/qcsrc/menu/msys.qh
bugfix target_spawn, and change docs to match it
[divverent/nexuiz.git] / data / qcsrc / menu / 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 ///////////////////////////
30 // key dest constants
31
32 float KEY_UNKNOWN       =       -1;
33 float KEY_GAME          =       0;
34 float KEY_MENU          =       2;
35 float KEY_MENU_GRABBED = 3;
36
37 ///////////////////////////
38 // file constants
39
40 float FILE_READ = 0;
41 float FILE_APPEND = 1;
42 float FILE_WRITE = 2;
43
44 ///////////////////////////
45 // logical constants (just for completeness)
46
47 float TRUE      = 1;
48 float FALSE = 0;
49
50 ///////////////////////////
51 // boolean constants
52
53 float true  = 1;
54 float false = 0;
55
56 ///////////////////////////
57 // msg constants
58
59 float MSG_BROADCAST             = 0;            // unreliable to all
60 float MSG_ONE                   = 1;            // reliable to one (msg_entity)
61 float MSG_ALL                   = 2;            // reliable to all
62 float MSG_INIT                  = 3;            // write to the init string
63
64 /////////////////////////////
65 // mouse target constants
66
67 float MT_MENU = 1;
68 float MT_CLIENT = 2;
69
70 /////////////////////////
71 // client state constants
72
73 float CS_DEDICATED              = 0;
74 float CS_DISCONNECTED   = 1;
75 float CS_CONNECTED              = 2;
76
77 ///////////////////////////
78 // blend flags
79
80 float DRAWFLAG_NORMAL           = 0;
81 float DRAWFLAG_ADDITIVE         = 1;
82 float DRAWFLAG_MODULATE         = 2;
83 float DRAWFLAG_2XMODULATE   = 3;
84
85
86 ///////////////////////////
87 // server list constants
88
89 float SLIST_HOSTCACHEVIEWCOUNT  = 0;
90 float SLIST_HOSTCACHETOTALCOUNT = 1;
91 float SLIST_MASTERQUERYCOUNT    = 2;
92 float SLIST_MASTERREPLYCOUNT    = 3;
93 float SLIST_SERVERQUERYCOUNT    = 4;
94 float SLIST_SERVERREPLYCOUNT    = 5;
95 float SLIST_SORTFIELD           = 6;
96 float SLIST_SORTDESCENDING      = 7;
97
98 float SLIST_LEGACY_LINE1        = 1024;
99 float SLIST_LEGACY_LINE2        = 1025;
100
101 float SLIST_TEST_CONTAINS       = 0;
102 float SLIST_TEST_NOTCONTAIN     = 1;
103 float SLIST_TEST_LESSEQUAL      = 2;
104 float SLIST_TEST_LESS           = 3;
105 float SLIST_TEST_EQUAL          = 4;
106 float SLIST_TEST_GREATER        = 5;
107 float SLIST_TEST_GREATEREQUAL   = 6;
108 float SLIST_TEST_NOTEQUAL       = 7;
109 float SLIST_TEST_STARTSWITH     = 8;
110 float SLIST_TEST_NOTSTARTSWITH  = 9;
111
112 float SLIST_MASK_AND = 0;
113 float SLIST_MASK_OR  = 512;
114
115 float NET_CURRENTPROTOCOL = 3;
116
117 ////////////////////////////////
118 // cinematic action constants
119
120 float CINE_PLAY         = 1;
121 float CINE_LOOP         = 2;
122 float CINE_PAUSE        = 3;
123 float CINE_FIRSTFRAME   = 4;
124 float CINE_RESETONWAKEUP= 5;
125
126 ///////////////////////////
127 // null entity (actually it is the same like the world entity)
128
129 entity null_entity;
130
131 ///////////////////////////
132 // error constants
133
134 // file handling
135 float ERR_CANNOTOPEN                    = -1; // fopen
136 float ERR_NOTENOUGHFILEHANDLES  = -2; // fopen
137 float ERR_INVALIDMODE                   = -3; // fopen
138 float ERR_BADFILENAME                   = -4; // fopen
139
140 // drawing functions
141
142 float ERR_NULLSTRING                    = -1;
143 float ERR_BADDRAWFLAG                   = -2;
144 float ERR_BADSCALE                      = -3;
145 //float ERR_BADSIZE                     = ERR_BADSCALE;
146 float ERR_NOTCACHED                     = -4;
147
148 float GECKO_BUTTON_DOWN                 = 0;
149 float GECKO_BUTTON_UP                   = 1;
150 // either use down and up or just press but not all of them!
151 float GECKO_BUTTON_PRESS                = 2;
152 // use this for mouse events if needed?
153 float GECKO_BUTTON_DOUBLECLICK  = 3;
154
155 /* not supported at the moment
156 ///////////////////////////
157 // os constants
158
159 float OS_WINDOWS        = 0;
160 float OS_LINUX          = 1;
161 float OS_MAC            = 2;
162 */
163
164 float drawfont; // set this to one of the following for draw text routines to work with another font
165 float FONT_DEFAULT     = 0;
166 float FONT_CONSOLE     = 1;
167 float FONT_SBAR        = 2;
168 float FONT_NOTIFY      = 3;
169 float FONT_CHAT        = 4;
170 float FONT_CENTERPRINT = 5;
171 float FONT_INFOBAR     = 6;
172 float FONT_MENU        = 7;
173 float FONT_USER        = 8; // add to this the index, like FONT_USER+3 = user3. At least 8 of them are supported.