diff options
author | James Cook <james@lindenlab.com> | 2007-01-02 08:33:20 +0000 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2007-01-02 08:33:20 +0000 |
commit | 420b91db29485df39fd6e724e782c449158811cb (patch) | |
tree | b471a94563af914d3ed3edd3e856d21cb1b69945 /indra/llcommon/llagentconstants.h |
Print done when done.
Diffstat (limited to 'indra/llcommon/llagentconstants.h')
-rw-r--r-- | indra/llcommon/llagentconstants.h | 141 |
1 files changed, 141 insertions, 0 deletions
diff --git a/indra/llcommon/llagentconstants.h b/indra/llcommon/llagentconstants.h new file mode 100644 index 0000000000..66b4b564bf --- /dev/null +++ b/indra/llcommon/llagentconstants.h @@ -0,0 +1,141 @@ +/** + * @file llagentconstants.h + * @author James Cook, Andrew Meadows, Richard Nelson + * @brief Shared constants through the system for agents. + * + * Copyright (c) 2006-$CurrentYear$, Linden Research, Inc. + * $License$ + */ + +#ifndef LL_LLAGENTCONSTANTS_H +#define LL_LLAGENTCONSTANTS_H + +const U32 CONTROL_AT_POS_INDEX = 0; +const U32 CONTROL_AT_NEG_INDEX = 1; +const U32 CONTROL_LEFT_POS_INDEX = 2; +const U32 CONTROL_LEFT_NEG_INDEX = 3; +const U32 CONTROL_UP_POS_INDEX = 4; +const U32 CONTROL_UP_NEG_INDEX = 5; +const U32 CONTROL_PITCH_POS_INDEX = 6; +const U32 CONTROL_PITCH_NEG_INDEX = 7; +const U32 CONTROL_YAW_POS_INDEX = 8; +const U32 CONTROL_YAW_NEG_INDEX = 9; +const U32 CONTROL_FAST_AT_INDEX = 10; +const U32 CONTROL_FAST_LEFT_INDEX = 11; +const U32 CONTROL_FAST_UP_INDEX = 12; +const U32 CONTROL_FLY_INDEX = 13; +const U32 CONTROL_STOP_INDEX = 14; +const U32 CONTROL_FINISH_ANIM_INDEX = 15; +const U32 CONTROL_STAND_UP_INDEX = 16; +const U32 CONTROL_SIT_ON_GROUND_INDEX = 17; +const U32 CONTROL_MOUSELOOK_INDEX = 18; +const U32 CONTROL_NUDGE_AT_POS_INDEX = 19; +const U32 CONTROL_NUDGE_AT_NEG_INDEX = 20; +const U32 CONTROL_NUDGE_LEFT_POS_INDEX = 21; +const U32 CONTROL_NUDGE_LEFT_NEG_INDEX = 22; +const U32 CONTROL_NUDGE_UP_POS_INDEX = 23; +const U32 CONTROL_NUDGE_UP_NEG_INDEX = 24; +const U32 CONTROL_TURN_LEFT_INDEX = 25; +const U32 CONTROL_TURN_RIGHT_INDEX = 26; +const U32 CONTROL_AWAY_INDEX = 27; +const U32 CONTROL_LBUTTON_DOWN_INDEX = 28; +const U32 CONTROL_LBUTTON_UP_INDEX = 29; +const U32 CONTROL_ML_LBUTTON_DOWN_INDEX = 30; +const U32 CONTROL_ML_LBUTTON_UP_INDEX = 31; +const U32 TOTAL_CONTROLS = 32; + +const U32 AGENT_CONTROL_AT_POS = 0x1 << CONTROL_AT_POS_INDEX; +const U32 AGENT_CONTROL_AT_NEG = 0x1 << CONTROL_AT_NEG_INDEX; +const U32 AGENT_CONTROL_LEFT_POS = 0x1 << CONTROL_LEFT_POS_INDEX; +const U32 AGENT_CONTROL_LEFT_NEG = 0x1 << CONTROL_LEFT_NEG_INDEX; +const U32 AGENT_CONTROL_UP_POS = 0x1 << CONTROL_UP_POS_INDEX; +const U32 AGENT_CONTROL_UP_NEG = 0x1 << CONTROL_UP_NEG_INDEX; +const U32 AGENT_CONTROL_PITCH_POS = 0x1 << CONTROL_PITCH_POS_INDEX; +const U32 AGENT_CONTROL_PITCH_NEG = 0x1 << CONTROL_PITCH_NEG_INDEX; +const U32 AGENT_CONTROL_YAW_POS = 0x1 << CONTROL_YAW_POS_INDEX; +const U32 AGENT_CONTROL_YAW_NEG = 0x1 << CONTROL_YAW_NEG_INDEX; + +const U32 AGENT_CONTROL_FAST_AT = 0x1 << CONTROL_FAST_AT_INDEX; +const U32 AGENT_CONTROL_FAST_LEFT = 0x1 << CONTROL_FAST_LEFT_INDEX; +const U32 AGENT_CONTROL_FAST_UP = 0x1 << CONTROL_FAST_UP_INDEX; + +const U32 AGENT_CONTROL_FLY = 0x1 << CONTROL_FLY_INDEX; +const U32 AGENT_CONTROL_STOP = 0x1 << CONTROL_STOP_INDEX; +const U32 AGENT_CONTROL_FINISH_ANIM = 0x1 << CONTROL_FINISH_ANIM_INDEX; +const U32 AGENT_CONTROL_STAND_UP = 0x1 << CONTROL_STAND_UP_INDEX; +const U32 AGENT_CONTROL_SIT_ON_GROUND = 0x1 << CONTROL_SIT_ON_GROUND_INDEX; +const U32 AGENT_CONTROL_MOUSELOOK = 0x1 << CONTROL_MOUSELOOK_INDEX; + +const U32 AGENT_CONTROL_NUDGE_AT_POS = 0x1 << CONTROL_NUDGE_AT_POS_INDEX; +const U32 AGENT_CONTROL_NUDGE_AT_NEG = 0x1 << CONTROL_NUDGE_AT_NEG_INDEX; +const U32 AGENT_CONTROL_NUDGE_LEFT_POS = 0x1 << CONTROL_NUDGE_LEFT_POS_INDEX; +const U32 AGENT_CONTROL_NUDGE_LEFT_NEG = 0x1 << CONTROL_NUDGE_LEFT_NEG_INDEX; +const U32 AGENT_CONTROL_NUDGE_UP_POS = 0x1 << CONTROL_NUDGE_UP_POS_INDEX; +const U32 AGENT_CONTROL_NUDGE_UP_NEG = 0x1 << CONTROL_NUDGE_UP_NEG_INDEX; +const U32 AGENT_CONTROL_TURN_LEFT = 0x1 << CONTROL_TURN_LEFT_INDEX; +const U32 AGENT_CONTROL_TURN_RIGHT = 0x1 << CONTROL_TURN_RIGHT_INDEX; + +const U32 AGENT_CONTROL_AWAY = 0x1 << CONTROL_AWAY_INDEX; + +const U32 AGENT_CONTROL_LBUTTON_DOWN = 0x1 << CONTROL_LBUTTON_DOWN_INDEX; +const U32 AGENT_CONTROL_LBUTTON_UP = 0x1 << CONTROL_LBUTTON_UP_INDEX; +const U32 AGENT_CONTROL_ML_LBUTTON_DOWN = 0x1 << CONTROL_ML_LBUTTON_DOWN_INDEX; +const U32 AGENT_CONTROL_ML_LBUTTON_UP = ((U32)0x1) << CONTROL_ML_LBUTTON_UP_INDEX; + +const U32 AGENT_CONTROL_AT = AGENT_CONTROL_AT_POS + | AGENT_CONTROL_AT_NEG + | AGENT_CONTROL_NUDGE_AT_POS + | AGENT_CONTROL_NUDGE_AT_NEG; + +const U32 AGENT_CONTROL_LEFT = AGENT_CONTROL_LEFT_POS + | AGENT_CONTROL_LEFT_NEG + | AGENT_CONTROL_NUDGE_LEFT_POS + | AGENT_CONTROL_NUDGE_LEFT_NEG; + +const U32 AGENT_CONTROL_UP = AGENT_CONTROL_UP_POS + | AGENT_CONTROL_UP_NEG + | AGENT_CONTROL_NUDGE_UP_POS + | AGENT_CONTROL_NUDGE_UP_NEG; + +const U32 AGENT_CONTROL_HORIZONTAL = AGENT_CONTROL_AT + | AGENT_CONTROL_LEFT; + +const U32 AGENT_CONTROL_NOT_USED_BY_LSL = AGENT_CONTROL_FLY + | AGENT_CONTROL_STOP + | AGENT_CONTROL_FINISH_ANIM + | AGENT_CONTROL_STAND_UP + | AGENT_CONTROL_SIT_ON_GROUND + | AGENT_CONTROL_MOUSELOOK + | AGENT_CONTROL_AWAY; + +const U32 AGENT_CONTROL_MOVEMENT = AGENT_CONTROL_AT + | AGENT_CONTROL_LEFT + | AGENT_CONTROL_UP; + +const U32 AGENT_CONTROL_ROTATION = AGENT_CONTROL_PITCH_POS + | AGENT_CONTROL_PITCH_NEG + | AGENT_CONTROL_YAW_POS + | AGENT_CONTROL_YAW_NEG; + +const U32 AGENT_CONTROL_NUDGE = AGENT_CONTROL_NUDGE_AT_POS + | AGENT_CONTROL_NUDGE_AT_NEG + | AGENT_CONTROL_NUDGE_LEFT_POS + | AGENT_CONTROL_NUDGE_LEFT_NEG; + + +// move these up so that we can hide them in "State" for object updates +// (for now) +const U32 AGENT_ATTACH_OFFSET = 4; +const U32 AGENT_ATTACH_MASK = 0xf << AGENT_ATTACH_OFFSET; +const U32 AGENT_ATTACH_CLEAR = 0x00; + +// RN: this method swaps the upper and lower nibbles to maintain backward +// compatibility with old objects that only used the upper nibble +#define ATTACHMENT_ID_FROM_STATE(state) ((S32)((((U8)state & AGENT_ATTACH_MASK) >> 4) | (((U8)state & ~AGENT_ATTACH_MASK) << 4))) + +// test state for use in testing grabbing the camera +const U32 AGENT_CAMERA_OBJECT = 0x1 << 3; + +const F32 MAX_ATTACHMENT_DIST = 3.5f; // meters? + +#endif |