aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/llagentconstants.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:46 -0500
committerJacek Antonelli2008-08-15 23:44:46 -0500
commit38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch)
treeadca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/llcommon/llagentconstants.h
parentREADME.txt (diff)
downloadmeta-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/llagentconstants.h')
-rw-r--r--linden/indra/llcommon/llagentconstants.h160
1 files changed, 160 insertions, 0 deletions
diff --git a/linden/indra/llcommon/llagentconstants.h b/linden/indra/llcommon/llagentconstants.h
new file mode 100644
index 0000000..fe51688
--- /dev/null
+++ b/linden/indra/llcommon/llagentconstants.h
@@ -0,0 +1,160 @@
1/**
2 * @file llagentconstants.h
3 * @author James Cook, Andrew Meadows, Richard Nelson
4 * @brief Shared constants through the system for agents.
5 *
6 * Copyright (c) 2006-2007, Linden Research, Inc.
7 *
8 * The source code in this file ("Source Code") is provided by Linden Lab
9 * to you under the terms of the GNU General Public License, version 2.0
10 * ("GPL"), unless you have obtained a separate licensing agreement
11 * ("Other License"), formally executed by you and Linden Lab. Terms of
12 * the GPL can be found in doc/GPL-license.txt in this distribution, or
13 * online at http://secondlife.com/developers/opensource/gplv2
14 *
15 * There are special exceptions to the terms and conditions of the GPL as
16 * it is applied to this Source Code. View the full text of the exception
17 * in the file doc/FLOSS-exception.txt in this software distribution, or
18 * online at http://secondlife.com/developers/opensource/flossexception
19 *
20 * By copying, modifying or distributing this software, you acknowledge
21 * that you have read and understood your obligations described above,
22 * and agree to abide by those obligations.
23 *
24 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
25 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
26 * COMPLETENESS OR PERFORMANCE.
27 */
28
29#ifndef LL_LLAGENTCONSTANTS_H
30#define LL_LLAGENTCONSTANTS_H
31
32const U32 CONTROL_AT_POS_INDEX = 0;
33const U32 CONTROL_AT_NEG_INDEX = 1;
34const U32 CONTROL_LEFT_POS_INDEX = 2;
35const U32 CONTROL_LEFT_NEG_INDEX = 3;
36const U32 CONTROL_UP_POS_INDEX = 4;
37const U32 CONTROL_UP_NEG_INDEX = 5;
38const U32 CONTROL_PITCH_POS_INDEX = 6;
39const U32 CONTROL_PITCH_NEG_INDEX = 7;
40const U32 CONTROL_YAW_POS_INDEX = 8;
41const U32 CONTROL_YAW_NEG_INDEX = 9;
42const U32 CONTROL_FAST_AT_INDEX = 10;
43const U32 CONTROL_FAST_LEFT_INDEX = 11;
44const U32 CONTROL_FAST_UP_INDEX = 12;
45const U32 CONTROL_FLY_INDEX = 13;
46const U32 CONTROL_STOP_INDEX = 14;
47const U32 CONTROL_FINISH_ANIM_INDEX = 15;
48const U32 CONTROL_STAND_UP_INDEX = 16;
49const U32 CONTROL_SIT_ON_GROUND_INDEX = 17;
50const U32 CONTROL_MOUSELOOK_INDEX = 18;
51const U32 CONTROL_NUDGE_AT_POS_INDEX = 19;
52const U32 CONTROL_NUDGE_AT_NEG_INDEX = 20;
53const U32 CONTROL_NUDGE_LEFT_POS_INDEX = 21;
54const U32 CONTROL_NUDGE_LEFT_NEG_INDEX = 22;
55const U32 CONTROL_NUDGE_UP_POS_INDEX = 23;
56const U32 CONTROL_NUDGE_UP_NEG_INDEX = 24;
57const U32 CONTROL_TURN_LEFT_INDEX = 25;
58const U32 CONTROL_TURN_RIGHT_INDEX = 26;
59const U32 CONTROL_AWAY_INDEX = 27;
60const U32 CONTROL_LBUTTON_DOWN_INDEX = 28;
61const U32 CONTROL_LBUTTON_UP_INDEX = 29;
62const U32 CONTROL_ML_LBUTTON_DOWN_INDEX = 30;
63const U32 CONTROL_ML_LBUTTON_UP_INDEX = 31;
64const U32 TOTAL_CONTROLS = 32;
65
66const U32 AGENT_CONTROL_AT_POS = 0x1 << CONTROL_AT_POS_INDEX;
67const U32 AGENT_CONTROL_AT_NEG = 0x1 << CONTROL_AT_NEG_INDEX;
68const U32 AGENT_CONTROL_LEFT_POS = 0x1 << CONTROL_LEFT_POS_INDEX;
69const U32 AGENT_CONTROL_LEFT_NEG = 0x1 << CONTROL_LEFT_NEG_INDEX;
70const U32 AGENT_CONTROL_UP_POS = 0x1 << CONTROL_UP_POS_INDEX;
71const U32 AGENT_CONTROL_UP_NEG = 0x1 << CONTROL_UP_NEG_INDEX;
72const U32 AGENT_CONTROL_PITCH_POS = 0x1 << CONTROL_PITCH_POS_INDEX;
73const U32 AGENT_CONTROL_PITCH_NEG = 0x1 << CONTROL_PITCH_NEG_INDEX;
74const U32 AGENT_CONTROL_YAW_POS = 0x1 << CONTROL_YAW_POS_INDEX;
75const U32 AGENT_CONTROL_YAW_NEG = 0x1 << CONTROL_YAW_NEG_INDEX;
76
77const U32 AGENT_CONTROL_FAST_AT = 0x1 << CONTROL_FAST_AT_INDEX;
78const U32 AGENT_CONTROL_FAST_LEFT = 0x1 << CONTROL_FAST_LEFT_INDEX;
79const U32 AGENT_CONTROL_FAST_UP = 0x1 << CONTROL_FAST_UP_INDEX;
80
81const U32 AGENT_CONTROL_FLY = 0x1 << CONTROL_FLY_INDEX;
82const U32 AGENT_CONTROL_STOP = 0x1 << CONTROL_STOP_INDEX;
83const U32 AGENT_CONTROL_FINISH_ANIM = 0x1 << CONTROL_FINISH_ANIM_INDEX;
84const U32 AGENT_CONTROL_STAND_UP = 0x1 << CONTROL_STAND_UP_INDEX;
85const U32 AGENT_CONTROL_SIT_ON_GROUND = 0x1 << CONTROL_SIT_ON_GROUND_INDEX;
86const U32 AGENT_CONTROL_MOUSELOOK = 0x1 << CONTROL_MOUSELOOK_INDEX;
87
88const U32 AGENT_CONTROL_NUDGE_AT_POS = 0x1 << CONTROL_NUDGE_AT_POS_INDEX;
89const U32 AGENT_CONTROL_NUDGE_AT_NEG = 0x1 << CONTROL_NUDGE_AT_NEG_INDEX;
90const U32 AGENT_CONTROL_NUDGE_LEFT_POS = 0x1 << CONTROL_NUDGE_LEFT_POS_INDEX;
91const U32 AGENT_CONTROL_NUDGE_LEFT_NEG = 0x1 << CONTROL_NUDGE_LEFT_NEG_INDEX;
92const U32 AGENT_CONTROL_NUDGE_UP_POS = 0x1 << CONTROL_NUDGE_UP_POS_INDEX;
93const U32 AGENT_CONTROL_NUDGE_UP_NEG = 0x1 << CONTROL_NUDGE_UP_NEG_INDEX;
94const U32 AGENT_CONTROL_TURN_LEFT = 0x1 << CONTROL_TURN_LEFT_INDEX;
95const U32 AGENT_CONTROL_TURN_RIGHT = 0x1 << CONTROL_TURN_RIGHT_INDEX;
96
97const U32 AGENT_CONTROL_AWAY = 0x1 << CONTROL_AWAY_INDEX;
98
99const U32 AGENT_CONTROL_LBUTTON_DOWN = 0x1 << CONTROL_LBUTTON_DOWN_INDEX;
100const U32 AGENT_CONTROL_LBUTTON_UP = 0x1 << CONTROL_LBUTTON_UP_INDEX;
101const U32 AGENT_CONTROL_ML_LBUTTON_DOWN = 0x1 << CONTROL_ML_LBUTTON_DOWN_INDEX;
102const U32 AGENT_CONTROL_ML_LBUTTON_UP = ((U32)0x1) << CONTROL_ML_LBUTTON_UP_INDEX;
103
104const U32 AGENT_CONTROL_AT = AGENT_CONTROL_AT_POS
105 | AGENT_CONTROL_AT_NEG
106 | AGENT_CONTROL_NUDGE_AT_POS
107 | AGENT_CONTROL_NUDGE_AT_NEG;
108
109const U32 AGENT_CONTROL_LEFT = AGENT_CONTROL_LEFT_POS
110 | AGENT_CONTROL_LEFT_NEG
111 | AGENT_CONTROL_NUDGE_LEFT_POS
112 | AGENT_CONTROL_NUDGE_LEFT_NEG;
113
114const U32 AGENT_CONTROL_UP = AGENT_CONTROL_UP_POS
115 | AGENT_CONTROL_UP_NEG
116 | AGENT_CONTROL_NUDGE_UP_POS
117 | AGENT_CONTROL_NUDGE_UP_NEG;
118
119const U32 AGENT_CONTROL_HORIZONTAL = AGENT_CONTROL_AT
120 | AGENT_CONTROL_LEFT;
121
122const U32 AGENT_CONTROL_NOT_USED_BY_LSL = AGENT_CONTROL_FLY
123 | AGENT_CONTROL_STOP
124 | AGENT_CONTROL_FINISH_ANIM
125 | AGENT_CONTROL_STAND_UP
126 | AGENT_CONTROL_SIT_ON_GROUND
127 | AGENT_CONTROL_MOUSELOOK
128 | AGENT_CONTROL_AWAY;
129
130const U32 AGENT_CONTROL_MOVEMENT = AGENT_CONTROL_AT
131 | AGENT_CONTROL_LEFT
132 | AGENT_CONTROL_UP;
133
134const U32 AGENT_CONTROL_ROTATION = AGENT_CONTROL_PITCH_POS
135 | AGENT_CONTROL_PITCH_NEG
136 | AGENT_CONTROL_YAW_POS
137 | AGENT_CONTROL_YAW_NEG;
138
139const U32 AGENT_CONTROL_NUDGE = AGENT_CONTROL_NUDGE_AT_POS
140 | AGENT_CONTROL_NUDGE_AT_NEG
141 | AGENT_CONTROL_NUDGE_LEFT_POS
142 | AGENT_CONTROL_NUDGE_LEFT_NEG;
143
144
145// move these up so that we can hide them in "State" for object updates
146// (for now)
147const U32 AGENT_ATTACH_OFFSET = 4;
148const U32 AGENT_ATTACH_MASK = 0xf << AGENT_ATTACH_OFFSET;
149const U32 AGENT_ATTACH_CLEAR = 0x00;
150
151// RN: this method swaps the upper and lower nibbles to maintain backward
152// compatibility with old objects that only used the upper nibble
153#define ATTACHMENT_ID_FROM_STATE(state) ((S32)((((U8)state & AGENT_ATTACH_MASK) >> 4) | (((U8)state & ~AGENT_ATTACH_MASK) << 4)))
154
155// test state for use in testing grabbing the camera
156const U32 AGENT_CAMERA_OBJECT = 0x1 << 3;
157
158const F32 MAX_ATTACHMENT_DIST = 3.5f; // meters?
159
160#endif