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/llagentconstants.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/llagentconstants.h')
-rw-r--r-- | linden/indra/llcommon/llagentconstants.h | 160 |
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 | |||
32 | const U32 CONTROL_AT_POS_INDEX = 0; | ||
33 | const U32 CONTROL_AT_NEG_INDEX = 1; | ||
34 | const U32 CONTROL_LEFT_POS_INDEX = 2; | ||
35 | const U32 CONTROL_LEFT_NEG_INDEX = 3; | ||
36 | const U32 CONTROL_UP_POS_INDEX = 4; | ||
37 | const U32 CONTROL_UP_NEG_INDEX = 5; | ||
38 | const U32 CONTROL_PITCH_POS_INDEX = 6; | ||
39 | const U32 CONTROL_PITCH_NEG_INDEX = 7; | ||
40 | const U32 CONTROL_YAW_POS_INDEX = 8; | ||
41 | const U32 CONTROL_YAW_NEG_INDEX = 9; | ||
42 | const U32 CONTROL_FAST_AT_INDEX = 10; | ||
43 | const U32 CONTROL_FAST_LEFT_INDEX = 11; | ||
44 | const U32 CONTROL_FAST_UP_INDEX = 12; | ||
45 | const U32 CONTROL_FLY_INDEX = 13; | ||
46 | const U32 CONTROL_STOP_INDEX = 14; | ||
47 | const U32 CONTROL_FINISH_ANIM_INDEX = 15; | ||
48 | const U32 CONTROL_STAND_UP_INDEX = 16; | ||
49 | const U32 CONTROL_SIT_ON_GROUND_INDEX = 17; | ||
50 | const U32 CONTROL_MOUSELOOK_INDEX = 18; | ||
51 | const U32 CONTROL_NUDGE_AT_POS_INDEX = 19; | ||
52 | const U32 CONTROL_NUDGE_AT_NEG_INDEX = 20; | ||
53 | const U32 CONTROL_NUDGE_LEFT_POS_INDEX = 21; | ||
54 | const U32 CONTROL_NUDGE_LEFT_NEG_INDEX = 22; | ||
55 | const U32 CONTROL_NUDGE_UP_POS_INDEX = 23; | ||
56 | const U32 CONTROL_NUDGE_UP_NEG_INDEX = 24; | ||
57 | const U32 CONTROL_TURN_LEFT_INDEX = 25; | ||
58 | const U32 CONTROL_TURN_RIGHT_INDEX = 26; | ||
59 | const U32 CONTROL_AWAY_INDEX = 27; | ||
60 | const U32 CONTROL_LBUTTON_DOWN_INDEX = 28; | ||
61 | const U32 CONTROL_LBUTTON_UP_INDEX = 29; | ||
62 | const U32 CONTROL_ML_LBUTTON_DOWN_INDEX = 30; | ||
63 | const U32 CONTROL_ML_LBUTTON_UP_INDEX = 31; | ||
64 | const U32 TOTAL_CONTROLS = 32; | ||
65 | |||
66 | const U32 AGENT_CONTROL_AT_POS = 0x1 << CONTROL_AT_POS_INDEX; | ||
67 | const U32 AGENT_CONTROL_AT_NEG = 0x1 << CONTROL_AT_NEG_INDEX; | ||
68 | const U32 AGENT_CONTROL_LEFT_POS = 0x1 << CONTROL_LEFT_POS_INDEX; | ||
69 | const U32 AGENT_CONTROL_LEFT_NEG = 0x1 << CONTROL_LEFT_NEG_INDEX; | ||
70 | const U32 AGENT_CONTROL_UP_POS = 0x1 << CONTROL_UP_POS_INDEX; | ||
71 | const U32 AGENT_CONTROL_UP_NEG = 0x1 << CONTROL_UP_NEG_INDEX; | ||
72 | const U32 AGENT_CONTROL_PITCH_POS = 0x1 << CONTROL_PITCH_POS_INDEX; | ||
73 | const U32 AGENT_CONTROL_PITCH_NEG = 0x1 << CONTROL_PITCH_NEG_INDEX; | ||
74 | const U32 AGENT_CONTROL_YAW_POS = 0x1 << CONTROL_YAW_POS_INDEX; | ||
75 | const U32 AGENT_CONTROL_YAW_NEG = 0x1 << CONTROL_YAW_NEG_INDEX; | ||
76 | |||
77 | const U32 AGENT_CONTROL_FAST_AT = 0x1 << CONTROL_FAST_AT_INDEX; | ||
78 | const U32 AGENT_CONTROL_FAST_LEFT = 0x1 << CONTROL_FAST_LEFT_INDEX; | ||
79 | const U32 AGENT_CONTROL_FAST_UP = 0x1 << CONTROL_FAST_UP_INDEX; | ||
80 | |||
81 | const U32 AGENT_CONTROL_FLY = 0x1 << CONTROL_FLY_INDEX; | ||
82 | const U32 AGENT_CONTROL_STOP = 0x1 << CONTROL_STOP_INDEX; | ||
83 | const U32 AGENT_CONTROL_FINISH_ANIM = 0x1 << CONTROL_FINISH_ANIM_INDEX; | ||
84 | const U32 AGENT_CONTROL_STAND_UP = 0x1 << CONTROL_STAND_UP_INDEX; | ||
85 | const U32 AGENT_CONTROL_SIT_ON_GROUND = 0x1 << CONTROL_SIT_ON_GROUND_INDEX; | ||
86 | const U32 AGENT_CONTROL_MOUSELOOK = 0x1 << CONTROL_MOUSELOOK_INDEX; | ||
87 | |||
88 | const U32 AGENT_CONTROL_NUDGE_AT_POS = 0x1 << CONTROL_NUDGE_AT_POS_INDEX; | ||
89 | const U32 AGENT_CONTROL_NUDGE_AT_NEG = 0x1 << CONTROL_NUDGE_AT_NEG_INDEX; | ||
90 | const U32 AGENT_CONTROL_NUDGE_LEFT_POS = 0x1 << CONTROL_NUDGE_LEFT_POS_INDEX; | ||
91 | const U32 AGENT_CONTROL_NUDGE_LEFT_NEG = 0x1 << CONTROL_NUDGE_LEFT_NEG_INDEX; | ||
92 | const U32 AGENT_CONTROL_NUDGE_UP_POS = 0x1 << CONTROL_NUDGE_UP_POS_INDEX; | ||
93 | const U32 AGENT_CONTROL_NUDGE_UP_NEG = 0x1 << CONTROL_NUDGE_UP_NEG_INDEX; | ||
94 | const U32 AGENT_CONTROL_TURN_LEFT = 0x1 << CONTROL_TURN_LEFT_INDEX; | ||
95 | const U32 AGENT_CONTROL_TURN_RIGHT = 0x1 << CONTROL_TURN_RIGHT_INDEX; | ||
96 | |||
97 | const U32 AGENT_CONTROL_AWAY = 0x1 << CONTROL_AWAY_INDEX; | ||
98 | |||
99 | const U32 AGENT_CONTROL_LBUTTON_DOWN = 0x1 << CONTROL_LBUTTON_DOWN_INDEX; | ||
100 | const U32 AGENT_CONTROL_LBUTTON_UP = 0x1 << CONTROL_LBUTTON_UP_INDEX; | ||
101 | const U32 AGENT_CONTROL_ML_LBUTTON_DOWN = 0x1 << CONTROL_ML_LBUTTON_DOWN_INDEX; | ||
102 | const U32 AGENT_CONTROL_ML_LBUTTON_UP = ((U32)0x1) << CONTROL_ML_LBUTTON_UP_INDEX; | ||
103 | |||
104 | const 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 | |||
109 | const 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 | |||
114 | const 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 | |||
119 | const U32 AGENT_CONTROL_HORIZONTAL = AGENT_CONTROL_AT | ||
120 | | AGENT_CONTROL_LEFT; | ||
121 | |||
122 | const 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 | |||
130 | const U32 AGENT_CONTROL_MOVEMENT = AGENT_CONTROL_AT | ||
131 | | AGENT_CONTROL_LEFT | ||
132 | | AGENT_CONTROL_UP; | ||
133 | |||
134 | const U32 AGENT_CONTROL_ROTATION = AGENT_CONTROL_PITCH_POS | ||
135 | | AGENT_CONTROL_PITCH_NEG | ||
136 | | AGENT_CONTROL_YAW_POS | ||
137 | | AGENT_CONTROL_YAW_NEG; | ||
138 | |||
139 | const 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) | ||
147 | const U32 AGENT_ATTACH_OFFSET = 4; | ||
148 | const U32 AGENT_ATTACH_MASK = 0xf << AGENT_ATTACH_OFFSET; | ||
149 | const 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 | ||
156 | const U32 AGENT_CAMERA_OBJECT = 0x1 << 3; | ||
157 | |||
158 | const F32 MAX_ATTACHMENT_DIST = 3.5f; // meters? | ||
159 | |||
160 | #endif | ||