diff options
author | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
commit | 38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch) | |
tree | adca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/llcommon/indra_constants.h | |
parent | README.txt (diff) | |
download | meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.zip meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.gz meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.bz2 meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.xz |
Second Life viewer sources 1.13.2.12
Diffstat (limited to 'linden/indra/llcommon/indra_constants.h')
-rw-r--r-- | linden/indra/llcommon/indra_constants.h | 357 |
1 files changed, 357 insertions, 0 deletions
diff --git a/linden/indra/llcommon/indra_constants.h b/linden/indra/llcommon/indra_constants.h new file mode 100644 index 0000000..31c2559 --- /dev/null +++ b/linden/indra/llcommon/indra_constants.h | |||
@@ -0,0 +1,357 @@ | |||
1 | /** | ||
2 | * @file indra_constants.h | ||
3 | * @brief some useful short term constants for Indra | ||
4 | * | ||
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | ||
6 | * | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
8 | * to you under the terms of the GNU General Public License, version 2.0 | ||
9 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
10 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
11 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
12 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
13 | * | ||
14 | * There are special exceptions to the terms and conditions of the GPL as | ||
15 | * it is applied to this Source Code. View the full text of the exception | ||
16 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
17 | * online at http://secondlife.com/developers/opensource/flossexception | ||
18 | * | ||
19 | * By copying, modifying or distributing this software, you acknowledge | ||
20 | * that you have read and understood your obligations described above, | ||
21 | * and agree to abide by those obligations. | ||
22 | * | ||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
25 | * COMPLETENESS OR PERFORMANCE. | ||
26 | */ | ||
27 | |||
28 | #ifndef LL_INDRA_CONSTANTS_H | ||
29 | #define LL_INDRA_CONSTANTS_H | ||
30 | |||
31 | #include "lluuid.h" | ||
32 | |||
33 | // Viewer object cache version, change if object update | ||
34 | // format changes. JC | ||
35 | const U32 INDRA_OBJECT_CACHE_VERSION = 11; | ||
36 | |||
37 | // At 45 Hz collisions seem stable and objects seem | ||
38 | // to settle down at a reasonable rate. | ||
39 | // JC 3/18/2003 | ||
40 | const F32 HAVOK_TIMESTEP = 1.f / 45.f; | ||
41 | |||
42 | const F32 COLLISION_TOLERANCE = 0.1f; | ||
43 | |||
44 | // Time constants | ||
45 | const U32 HOURS_PER_LINDEN_DAY = 4; | ||
46 | const U32 DAYS_PER_LINDEN_YEAR = 11; | ||
47 | |||
48 | const U32 SEC_PER_LINDEN_DAY = HOURS_PER_LINDEN_DAY * 60 * 60; | ||
49 | const U32 SEC_PER_LINDEN_YEAR = DAYS_PER_LINDEN_YEAR * SEC_PER_LINDEN_DAY; | ||
50 | |||
51 | const F32 REGION_WIDTH_METERS = 256.f; | ||
52 | const S32 REGION_WIDTH_UNITS = 256; | ||
53 | const U32 REGION_WIDTH_U32 = 256; | ||
54 | |||
55 | // Bits for simulator performance query flags | ||
56 | enum LAND_STAT_FLAGS | ||
57 | { | ||
58 | STAT_FILTER_BY_PARCEL = 0x00000001, | ||
59 | STAT_FILTER_BY_OWNER = 0x00000002, | ||
60 | STAT_FILTER_BY_OBJECT = 0x00000004, | ||
61 | STAT_REQUEST_LAST_ENTRY = 0x80000000, | ||
62 | }; | ||
63 | |||
64 | enum LAND_STAT_REPORT_TYPE | ||
65 | { | ||
66 | STAT_REPORT_TOP_SCRIPTS = 0, | ||
67 | STAT_REPORT_TOP_COLLIDERS | ||
68 | }; | ||
69 | |||
70 | const U32 STAT_FILTER_MASK = 0x1FFFFFFF; | ||
71 | |||
72 | // Default maximum number of tasks/prims per region. | ||
73 | const U32 MAX_TASKS_PER_REGION = 15000; | ||
74 | |||
75 | const F32 MIN_AGENT_DEPTH = 0.30f; | ||
76 | const F32 DEFAULT_AGENT_DEPTH = 0.45f; | ||
77 | const F32 MAX_AGENT_DEPTH = 0.60f; | ||
78 | |||
79 | const F32 MIN_AGENT_WIDTH = 0.40f; | ||
80 | const F32 DEFAULT_AGENT_WIDTH = 0.60f; | ||
81 | const F32 MAX_AGENT_WIDTH = 0.80f; | ||
82 | |||
83 | const F32 MIN_AGENT_HEIGHT = 1.3f - 2.0f * COLLISION_TOLERANCE; | ||
84 | const F32 DEFAULT_AGENT_HEIGHT = 1.9f; | ||
85 | const F32 MAX_AGENT_HEIGHT = 2.65f - 2.0f * COLLISION_TOLERANCE; | ||
86 | |||
87 | // For linked sets | ||
88 | const S32 MAX_CHILDREN_PER_TASK = 255; | ||
89 | const S32 MAX_CHILDREN_PER_PHYSICAL_TASK = 31; | ||
90 | |||
91 | const S32 MAX_JOINTS_PER_OBJECT = 1; // limiting to 1 until Havok 2.x | ||
92 | |||
93 | const char* const DEFAULT_DMZ_SPACE_SERVER = "192.168.0.140"; | ||
94 | const char* const DEFAULT_DMZ_USER_SERVER = "192.168.0.140"; | ||
95 | const char* const DEFAULT_DMZ_DATA_SERVER = "192.168.0.140"; | ||
96 | const char* const DEFAULT_DMZ_ASSET_SERVER = "http://asset.dmz.lindenlab.com:80"; | ||
97 | |||
98 | const char* const DEFAULT_AGNI_SPACE_SERVER = "63.211.139.100"; | ||
99 | const char* const DEFAULT_AGNI_USER_SERVER = "63.211.139.100"; | ||
100 | const char* const DEFAULT_AGNI_DATA_SERVER = "63.211.139.100"; | ||
101 | const char* const DEFAULT_AGNI_ASSET_SERVER = "http://asset.agni.lindenlab.com:80"; | ||
102 | |||
103 | // Information about what ports are for what services is in the wiki Name Space Ports page | ||
104 | const char* const DEFAULT_LOCAL_ASSET_SERVER = "http://localhost:12041/asset/tmp"; | ||
105 | const char* const LOCAL_ASSET_URL_FORMAT = "http://%s:12041/asset"; | ||
106 | |||
107 | const U32 DEFAULT_LAUNCHER_PORT = 12029; | ||
108 | const U32 DEFAULT_BIGBOARD_PORT = 12030; | ||
109 | const U32 DEFAULT_QUERYSIM_PORT = 12031; | ||
110 | const U32 DEFAULT_DATA_SERVER_PORT = 12032; | ||
111 | const U32 DEFAULT_SPACE_SERVER_PORT = 12033; | ||
112 | const U32 DEFAULT_VIEWER_PORT = 12034; | ||
113 | const U32 DEFAULT_SIMULATOR_PORT = 12035; | ||
114 | const U32 DEFAULT_USER_SERVER_PORT = 12036; | ||
115 | const U32 DEFAULT_RPC_SERVER_PORT = 12037; | ||
116 | const U32 DEFAULT_LOG_DATA_SERVER_PORT = 12039; | ||
117 | const U32 DEFAULT_BACKBONE_PORT = 12040; | ||
118 | const U32 DEFAULT_LOCAL_ASSET_PORT = 12041; | ||
119 | const U32 DEFAULT_BACKBONE_CAP_PORT = 12042; | ||
120 | |||
121 | // For automatic port discovery when running multiple viewers on one host | ||
122 | const U32 PORT_DISCOVERY_RANGE_MIN = 13000; | ||
123 | const U32 PORT_DISCOVERY_RANGE_MAX = PORT_DISCOVERY_RANGE_MIN + 50; | ||
124 | |||
125 | const char LAND_LAYER_CODE = 'L'; | ||
126 | const char WATER_LAYER_CODE = 'W'; | ||
127 | const char WIND_LAYER_CODE = '7'; | ||
128 | const char CLOUD_LAYER_CODE = '8'; | ||
129 | |||
130 | // keys | ||
131 | // Bit masks for various keyboard modifier keys. | ||
132 | const MASK MASK_NONE = 0x0000; | ||
133 | const MASK MASK_CONTROL = 0x0001; | ||
134 | const MASK MASK_ALT = 0x0002; | ||
135 | const MASK MASK_SHIFT = 0x0004; | ||
136 | |||
137 | // Special keys go into >128 | ||
138 | const KEY KEY_SPECIAL = 0x80; // special keys start here | ||
139 | const KEY KEY_RETURN = 0x81; | ||
140 | const KEY KEY_LEFT = 0x82; | ||
141 | const KEY KEY_RIGHT = 0x83; | ||
142 | const KEY KEY_UP = 0x84; | ||
143 | const KEY KEY_DOWN = 0x85; | ||
144 | const KEY KEY_ESCAPE = 0x86; | ||
145 | const KEY KEY_BACKSPACE =0x87; | ||
146 | const KEY KEY_DELETE = 0x88; | ||
147 | const KEY KEY_SHIFT = 0x89; | ||
148 | const KEY KEY_CONTROL = 0x8A; | ||
149 | const KEY KEY_ALT = 0x8B; | ||
150 | const KEY KEY_HOME = 0x8C; | ||
151 | const KEY KEY_END = 0x8D; | ||
152 | const KEY KEY_PAGE_UP = 0x8E; | ||
153 | const KEY KEY_PAGE_DOWN = 0x8F; | ||
154 | const KEY KEY_HYPHEN = 0x90; | ||
155 | const KEY KEY_EQUALS = 0x91; | ||
156 | const KEY KEY_INSERT = 0x92; | ||
157 | const KEY KEY_CAPSLOCK = 0x93; | ||
158 | const KEY KEY_TAB = 0x94; | ||
159 | const KEY KEY_ADD = 0x95; | ||
160 | const KEY KEY_SUBTRACT =0x96; | ||
161 | const KEY KEY_MULTIPLY =0x97; | ||
162 | const KEY KEY_DIVIDE = 0x98; | ||
163 | const KEY KEY_F1 = 0xA1; | ||
164 | const KEY KEY_F2 = 0xA2; | ||
165 | const KEY KEY_F3 = 0xA3; | ||
166 | const KEY KEY_F4 = 0xA4; | ||
167 | const KEY KEY_F5 = 0xA5; | ||
168 | const KEY KEY_F6 = 0xA6; | ||
169 | const KEY KEY_F7 = 0xA7; | ||
170 | const KEY KEY_F8 = 0xA8; | ||
171 | const KEY KEY_F9 = 0xA9; | ||
172 | const KEY KEY_F10 = 0xAA; | ||
173 | const KEY KEY_F11 = 0xAB; | ||
174 | const KEY KEY_F12 = 0xAC; | ||
175 | |||
176 | const KEY KEY_PAD_UP = 0xC0; | ||
177 | const KEY KEY_PAD_DOWN = 0xC1; | ||
178 | const KEY KEY_PAD_LEFT = 0xC2; | ||
179 | const KEY KEY_PAD_RIGHT = 0xC3; | ||
180 | const KEY KEY_PAD_HOME = 0xC4; | ||
181 | const KEY KEY_PAD_END = 0xC5; | ||
182 | const KEY KEY_PAD_PGUP = 0xC6; | ||
183 | const KEY KEY_PAD_PGDN = 0xC7; | ||
184 | const KEY KEY_PAD_CENTER = 0xC8; // the 5 in the middle | ||
185 | const KEY KEY_PAD_INS = 0xC9; | ||
186 | const KEY KEY_PAD_DEL = 0xCA; | ||
187 | const KEY KEY_PAD_RETURN = 0xCB; | ||
188 | const KEY KEY_PAD_ADD = 0xCC; // not used | ||
189 | const KEY KEY_PAD_SUBTRACT = 0xCD; // not used | ||
190 | const KEY KEY_PAD_MULTIPLY = 0xCE; // not used | ||
191 | const KEY KEY_PAD_DIVIDE = 0xCF; // not used | ||
192 | |||
193 | const KEY KEY_BUTTON0 = 0xD0; | ||
194 | const KEY KEY_BUTTON1 = 0xD1; | ||
195 | const KEY KEY_BUTTON2 = 0xD2; | ||
196 | const KEY KEY_BUTTON3 = 0xD3; | ||
197 | const KEY KEY_BUTTON4 = 0xD4; | ||
198 | const KEY KEY_BUTTON5 = 0xD5; | ||
199 | const KEY KEY_BUTTON6 = 0xD6; | ||
200 | const KEY KEY_BUTTON7 = 0xD7; | ||
201 | const KEY KEY_BUTTON8 = 0xD8; | ||
202 | const KEY KEY_BUTTON9 = 0xD9; | ||
203 | const KEY KEY_BUTTON10 = 0xDA; | ||
204 | const KEY KEY_BUTTON11 = 0xDB; | ||
205 | const KEY KEY_BUTTON12 = 0xDC; | ||
206 | const KEY KEY_BUTTON13 = 0xDD; | ||
207 | const KEY KEY_BUTTON14 = 0xDE; | ||
208 | const KEY KEY_BUTTON15 = 0xDF; | ||
209 | |||
210 | const KEY KEY_NONE = 0xFF; // not sent from keyboard. For internal use only. | ||
211 | |||
212 | const S32 KEY_COUNT = 256; | ||
213 | |||
214 | |||
215 | const F32 DEFAULT_WATER_HEIGHT = 20.0f; | ||
216 | |||
217 | // Maturity ratings for simulators | ||
218 | const U8 SIM_ACCESS_MIN = 0; | ||
219 | const U8 SIM_ACCESS_TRIAL = 7; | ||
220 | const U8 SIM_ACCESS_PG = 13; | ||
221 | const U8 SIM_ACCESS_MATURE = 21; | ||
222 | const U8 SIM_ACCESS_DOWN = 254; | ||
223 | const U8 SIM_ACCESS_MAX = SIM_ACCESS_MATURE; | ||
224 | |||
225 | // group constants | ||
226 | const S32 MAX_AGENT_GROUPS = 25; | ||
227 | |||
228 | // god levels | ||
229 | const U8 GOD_MAINTENANCE = 250; | ||
230 | const U8 GOD_FULL = 200; | ||
231 | const U8 GOD_LIAISON = 150; | ||
232 | const U8 GOD_CUSTOMER_SERVICE = 100; | ||
233 | const U8 GOD_LIKE = 1; | ||
234 | const U8 GOD_NOT = 0; | ||
235 | |||
236 | // "agent id" for things that should be done to ALL agents | ||
237 | const LLUUID LL_UUID_ALL_AGENTS("44e87126-e794-4ded-05b3-7c42da3d5cdb"); | ||
238 | |||
239 | // Governor Linden's agent id. | ||
240 | const LLUUID GOVERNOR_LINDEN_ID("3d6181b0-6a4b-97ef-18d8-722652995cf1"); | ||
241 | const LLUUID REALESTATE_LINDEN_ID("3d6181b0-6a4b-97ef-18d8-722652995cf1"); | ||
242 | // Maintenance's group id. | ||
243 | const LLUUID MAINTENANCE_GROUP_ID("dc7b21cd-3c89-fcaa-31c8-25f9ffd224cd"); | ||
244 | |||
245 | // Flags for kick message | ||
246 | const U32 KICK_FLAGS_DEFAULT = 0x0; | ||
247 | const U32 KICK_FLAGS_FREEZE = 1 << 0; | ||
248 | const U32 KICK_FLAGS_UNFREEZE = 1 << 1; | ||
249 | |||
250 | const U8 UPD_NONE = 0x00; | ||
251 | const U8 UPD_POSITION = 0x01; | ||
252 | const U8 UPD_ROTATION = 0x02; | ||
253 | const U8 UPD_SCALE = 0x04; | ||
254 | const U8 UPD_LINKED_SETS = 0x08; | ||
255 | const U8 UPD_UNIFORM = 0x10; // used with UPD_SCALE | ||
256 | |||
257 | // Agent Update Flags (U8) | ||
258 | const U8 AU_FLAGS_NONE = 0x00; | ||
259 | const U8 AU_FLAGS_HIDETITLE = 0x01; | ||
260 | |||
261 | // start location constants | ||
262 | const U32 START_LOCATION_ID_LAST = 0; | ||
263 | const U32 START_LOCATION_ID_HOME = 1; | ||
264 | const U32 START_LOCATION_ID_DIRECT = 2; // for direct teleport | ||
265 | const U32 START_LOCATION_ID_PARCEL = 3; // for teleports to a parcel | ||
266 | const U32 START_LOCATION_ID_TELEHUB = 4; // for teleports to a spawnpoint | ||
267 | const U32 START_LOCATION_ID_URL = 5; | ||
268 | const U32 START_LOCATION_ID_COUNT = 6; | ||
269 | |||
270 | // group constants | ||
271 | const U32 GROUP_MIN_SIZE = 2; | ||
272 | |||
273 | // radius within which a chat message is fully audible | ||
274 | const F32 CHAT_WHISPER_RADIUS = 10.f; | ||
275 | const F32 CHAT_NORMAL_RADIUS = 20.f; | ||
276 | const F32 CHAT_SHOUT_RADIUS = 100.f; | ||
277 | const F32 CHAT_MAX_RADIUS = CHAT_SHOUT_RADIUS; | ||
278 | const F32 CHAT_MAX_RADIUS_BY_TWO = CHAT_MAX_RADIUS / 2.f; | ||
279 | |||
280 | // this times above gives barely audible radius | ||
281 | const F32 CHAT_BARELY_AUDIBLE_FACTOR = 2.0f; | ||
282 | |||
283 | // distance in front of speaking agent the sphere is centered | ||
284 | const F32 CHAT_WHISPER_OFFSET = 5.f; | ||
285 | const F32 CHAT_NORMAL_OFFSET = 10.f; | ||
286 | const F32 CHAT_SHOUT_OFFSET = 50.f; | ||
287 | |||
288 | // first clean starts at 3 AM | ||
289 | const S32 SANDBOX_FIRST_CLEAN_HOUR = 3; | ||
290 | // clean every <n> hours | ||
291 | const S32 SANDBOX_CLEAN_FREQ = 12; | ||
292 | |||
293 | const F32 WIND_SCALE_HACK = 2.0f; // hack to make wind speeds more realistic | ||
294 | |||
295 | enum ETerrainBrushType | ||
296 | { | ||
297 | // the valid brush numbers cannot be reordered, because they | ||
298 | // are used in the binary LSL format as arguments to llModifyLand() | ||
299 | E_LANDBRUSH_LEVEL = 0, | ||
300 | E_LANDBRUSH_RAISE = 1, | ||
301 | E_LANDBRUSH_LOWER = 2, | ||
302 | E_LANDBRUSH_SMOOTH = 3, | ||
303 | E_LANDBRUSH_NOISE = 4, | ||
304 | E_LANDBRUSH_REVERT = 5, | ||
305 | E_LANDBRUSH_INVALID = 6 | ||
306 | }; | ||
307 | |||
308 | // media commands | ||
309 | const U32 PARCEL_MEDIA_COMMAND_STOP = 0; | ||
310 | const U32 PARCEL_MEDIA_COMMAND_PAUSE = 1; | ||
311 | const U32 PARCEL_MEDIA_COMMAND_PLAY = 2; | ||
312 | const U32 PARCEL_MEDIA_COMMAND_LOOP = 3; | ||
313 | const U32 PARCEL_MEDIA_COMMAND_TEXTURE = 4; | ||
314 | const U32 PARCEL_MEDIA_COMMAND_URL = 5; | ||
315 | const U32 PARCEL_MEDIA_COMMAND_TIME = 6; | ||
316 | const U32 PARCEL_MEDIA_COMMAND_AGENT = 7; | ||
317 | const U32 PARCEL_MEDIA_COMMAND_UNLOAD = 8; | ||
318 | const U32 PARCEL_MEDIA_COMMAND_AUTO_ALIGN = 9; | ||
319 | |||
320 | // map item types | ||
321 | const U32 MAP_ITEM_TELEHUB = 0x01; | ||
322 | const U32 MAP_ITEM_PG_EVENT = 0x02; | ||
323 | const U32 MAP_ITEM_MATURE_EVENT = 0x03; | ||
324 | const U32 MAP_ITEM_POPULAR = 0x04; | ||
325 | const U32 MAP_ITEM_AGENT_COUNT = 0x05; | ||
326 | const U32 MAP_ITEM_AGENT_LOCATIONS = 0x06; | ||
327 | const U32 MAP_ITEM_LAND_FOR_SALE = 0x07; | ||
328 | const U32 MAP_ITEM_CLASSIFIED = 0x08; | ||
329 | |||
330 | // Crash reporter behavior | ||
331 | const char* const CRASH_SETTINGS_FILE = "crash_settings.xml"; | ||
332 | const char* const CRASH_BEHAVIOR_SETTING = "CrashBehavior"; | ||
333 | const S32 CRASH_BEHAVIOR_ASK = 0; | ||
334 | const S32 CRASH_BEHAVIOR_ALWAYS_SEND = 1; | ||
335 | const S32 CRASH_BEHAVIOR_NEVER_SEND = 2; | ||
336 | |||
337 | // Export/Import return values | ||
338 | const S32 EXPORT_SUCCESS = 0; | ||
339 | const S32 EXPORT_ERROR_PERMISSIONS = -1; | ||
340 | const S32 EXPORT_ERROR_UNKNOWN = -2; | ||
341 | |||
342 | // This is how long the sim will try to teleport you before giving up. | ||
343 | const F32 TELEPORT_EXPIRY = 15.0f; | ||
344 | // Additional time (in seconds) to wait per attachment | ||
345 | const F32 TELEPORT_EXPIRY_PER_ATTACHMENT = 3.f; | ||
346 | |||
347 | // The maximum size of an object extra parameters binary (packed) block | ||
348 | #define MAX_OBJECT_PARAMS_SIZE 1024 | ||
349 | |||
350 | const S32 CHAT_CHANNEL_DEBUG = S32_MAX; | ||
351 | |||
352 | // PLEASE don't add constants here. Every dev will have to do | ||
353 | // a complete rebuild. Try to find another shared header file, | ||
354 | // like llregionflags.h, lllslconstants.h, llagentconstants.h, | ||
355 | // or create a new one. JC | ||
356 | |||
357 | #endif | ||