PageRenderTime 74ms CodeModel.GetById 27ms app.highlight 43ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/llcommon/lllslconstants.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 213 lines | 154 code | 23 blank | 36 comment | 0 complexity | 43030adfb7d1a25c64e88b2de09ccad9 MD5 | raw file
  1/** 
  2 * @file lllslconstants.h
  3 * @author James Cook
  4 * @brief Constants used in lsl.
  5 *
  6 * $LicenseInfo:firstyear=2006&license=viewerlgpl$
  7 * Second Life Viewer Source Code
  8 * Copyright (C) 2010, Linden Research, Inc.
  9 * 
 10 * This library is free software; you can redistribute it and/or
 11 * modify it under the terms of the GNU Lesser General Public
 12 * License as published by the Free Software Foundation;
 13 * version 2.1 of the License only.
 14 * 
 15 * This library is distributed in the hope that it will be useful,
 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 18 * Lesser General Public License for more details.
 19 * 
 20 * You should have received a copy of the GNU Lesser General Public
 21 * License along with this library; if not, write to the Free Software
 22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 23 * 
 24 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
 25 * $/LicenseInfo$
 26 */
 27
 28#ifndef LL_LLLSLCONSTANTS_H
 29#define LL_LLLSLCONSTANTS_H
 30
 31// LSL: Return flags for llGetAgentInfo
 32const U32 AGENT_FLYING		= 0x0001;
 33const U32 AGENT_ATTACHMENTS	= 0x0002;
 34const U32 AGENT_SCRIPTED	= 0x0004;
 35const U32 AGENT_MOUSELOOK	= 0x0008;
 36const U32 AGENT_SITTING		= 0x0010;
 37const U32 AGENT_ON_OBJECT	= 0x0020;
 38const U32 AGENT_AWAY		= 0x0040;
 39const U32 AGENT_WALKING		= 0x0080;
 40const U32 AGENT_IN_AIR		= 0x0100;
 41const U32 AGENT_TYPING		= 0x0200;
 42const U32 AGENT_CROUCHING	= 0x0400;
 43const U32 AGENT_BUSY		= 0x0800;
 44const U32 AGENT_ALWAYS_RUN	= 0x1000;
 45const U32 AGENT_AUTOPILOT	= 0x2000;
 46
 47const S32 LSL_REMOTE_DATA_CHANNEL		= 1;
 48const S32 LSL_REMOTE_DATA_REQUEST		= 2;
 49const S32 LSL_REMOTE_DATA_REPLY			= 3;
 50
 51// Constants used in extended LSL primitive setter and getters
 52const S32 LSL_PRIM_TYPE_LEGACY	= 1; // No longer supported.
 53const S32 LSL_PRIM_MATERIAL		= 2;
 54const S32 LSL_PRIM_PHYSICS		= 3;
 55const S32 LSL_PRIM_TEMP_ON_REZ	= 4;
 56const S32 LSL_PRIM_PHANTOM		= 5;
 57const S32 LSL_PRIM_POSITION		= 6;
 58const S32 LSL_PRIM_SIZE			= 7;
 59const S32 LSL_PRIM_ROTATION		= 8;
 60const S32 LSL_PRIM_TYPE			= 9; // Replacement for LSL_PRIM_TYPE_LEGACY
 61const S32 LSL_PRIM_TEXTURE		= 17;
 62const S32 LSL_PRIM_COLOR		= 18;
 63const S32 LSL_PRIM_BUMP_SHINY	= 19;
 64const S32 LSL_PRIM_FULLBRIGHT	= 20;
 65const S32 LSL_PRIM_FLEXIBLE		= 21;
 66const S32 LSL_PRIM_TEXGEN		= 22;
 67const S32 LSL_PRIM_POINT_LIGHT	= 23;
 68const S32 LSL_PRIM_CAST_SHADOWS	= 24;
 69const S32 LSL_PRIM_GLOW     	= 25;
 70
 71const S32 LSL_PRIM_TYPE_BOX		= 0;
 72const S32 LSL_PRIM_TYPE_CYLINDER= 1;
 73const S32 LSL_PRIM_TYPE_PRISM	= 2;
 74const S32 LSL_PRIM_TYPE_SPHERE	= 3;
 75const S32 LSL_PRIM_TYPE_TORUS	= 4;
 76const S32 LSL_PRIM_TYPE_TUBE	= 5;
 77const S32 LSL_PRIM_TYPE_RING	= 6;
 78const S32 LSL_PRIM_TYPE_SCULPT  = 7;
 79
 80const S32 LSL_PRIM_HOLE_DEFAULT = 0x00;
 81const S32 LSL_PRIM_HOLE_CIRCLE	= 0x10;
 82const S32 LSL_PRIM_HOLE_SQUARE  = 0x20;
 83const S32 LSL_PRIM_HOLE_TRIANGLE= 0x30;
 84
 85const S32 LSL_PRIM_MATERIAL_STONE	= 0;
 86const S32 LSL_PRIM_MATERIAL_METAL	= 1;
 87const S32 LSL_PRIM_MATERIAL_GLASS	= 2;
 88const S32 LSL_PRIM_MATERIAL_WOOD	= 3;
 89const S32 LSL_PRIM_MATERIAL_FLESH	= 4;
 90const S32 LSL_PRIM_MATERIAL_PLASTIC	= 5;
 91const S32 LSL_PRIM_MATERIAL_RUBBER	= 6;
 92const S32 LSL_PRIM_MATERIAL_LIGHT	= 7;
 93
 94const S32 LSL_PRIM_SHINY_NONE		= 0;
 95const S32 LSL_PRIM_SHINY_LOW		= 1;
 96const S32 LSL_PRIM_SHINY_MEDIUM		= 2;
 97const S32 LSL_PRIM_SHINY_HIGH		= 3;
 98
 99const S32 LSL_PRIM_TEXGEN_DEFAULT	= 0;
100const S32 LSL_PRIM_TEXGEN_PLANAR	= 1;
101
102const S32 LSL_PRIM_BUMP_NONE		= 0;
103const S32 LSL_PRIM_BUMP_BRIGHT		= 1;
104const S32 LSL_PRIM_BUMP_DARK		= 2;
105const S32 LSL_PRIM_BUMP_WOOD		= 3;
106const S32 LSL_PRIM_BUMP_BARK		= 4;
107const S32 LSL_PRIM_BUMP_BRICKS		= 5;
108const S32 LSL_PRIM_BUMP_CHECKER		= 6;
109const S32 LSL_PRIM_BUMP_CONCRETE	= 7;
110const S32 LSL_PRIM_BUMP_TILE		= 8;
111const S32 LSL_PRIM_BUMP_STONE		= 9;
112const S32 LSL_PRIM_BUMP_DISKS		= 10;
113const S32 LSL_PRIM_BUMP_GRAVEL		= 11;
114const S32 LSL_PRIM_BUMP_BLOBS		= 12;
115const S32 LSL_PRIM_BUMP_SIDING		= 13;
116const S32 LSL_PRIM_BUMP_LARGETILE	= 14;
117const S32 LSL_PRIM_BUMP_STUCCO		= 15;
118const S32 LSL_PRIM_BUMP_SUCTION		= 16;
119const S32 LSL_PRIM_BUMP_WEAVE		= 17;
120
121const S32 LSL_PRIM_SCULPT_TYPE_SPHERE   = 1;
122const S32 LSL_PRIM_SCULPT_TYPE_TORUS    = 2;
123const S32 LSL_PRIM_SCULPT_TYPE_PLANE    = 3;
124const S32 LSL_PRIM_SCULPT_TYPE_CYLINDER = 4;
125const S32 LSL_PRIM_SCULPT_TYPE_MASK     = 7;
126const S32 LSL_PRIM_SCULPT_FLAG_INVERT   = 64;
127const S32 LSL_PRIM_SCULPT_FLAG_MIRROR   = 128;
128
129const S32 LSL_ALL_SIDES				= -1;
130const S32 LSL_LINK_ROOT				= 1;
131const S32 LSL_LINK_FIRST_CHILD		= 2;
132const S32 LSL_LINK_SET				= -1;
133const S32 LSL_LINK_ALL_OTHERS		= -2;
134const S32 LSL_LINK_ALL_CHILDREN		= -3;
135const S32 LSL_LINK_THIS				= -4;
136
137// LSL constants for llSetForSell
138const S32 SELL_NOT			= 0;
139const S32 SELL_ORIGINAL		= 1;
140const S32 SELL_COPY			= 2;
141const S32 SELL_CONTENTS		= 3;
142
143// LSL constants for llSetPayPrice
144const S32 PAY_PRICE_HIDE = -1;
145const S32 PAY_PRICE_DEFAULT = -2;
146const S32 MAX_PAY_BUTTONS = 4;
147const S32 PAY_BUTTON_DEFAULT_0 = 1;
148const S32 PAY_BUTTON_DEFAULT_1 = 5;
149const S32 PAY_BUTTON_DEFAULT_2 = 10;
150const S32 PAY_BUTTON_DEFAULT_3 = 20;
151
152// lsl email registration.
153const S32 EMAIL_REG_SUBSCRIBE_OBJECT	= 0x01;
154const S32 EMAIL_REG_UNSUBSCRIBE_OBJECT	= 0x02;
155const S32 EMAIL_REG_UNSUBSCRIBE_SIM		= 0x04;
156
157const S32 LIST_STAT_RANGE = 0;
158const S32 LIST_STAT_MIN		= 1;
159const S32 LIST_STAT_MAX		= 2;
160const S32 LIST_STAT_MEAN	= 3;
161const S32 LIST_STAT_MEDIAN	= 4;
162const S32 LIST_STAT_STD_DEV	= 5;
163const S32 LIST_STAT_SUM = 6;
164const S32 LIST_STAT_SUM_SQUARES = 7;
165const S32 LIST_STAT_NUM_COUNT = 8;
166const S32 LIST_STAT_GEO_MEAN = 9;
167
168const S32 STRING_TRIM_HEAD = 0x01;
169const S32 STRING_TRIM_TAIL = 0x02;
170const S32 STRING_TRIM = STRING_TRIM_HEAD | STRING_TRIM_TAIL;
171
172// llGetObjectDetails
173const S32 OBJECT_UNKNOWN_DETAIL = -1;
174const S32 OBJECT_NAME = 1;
175const S32 OBJECT_DESC = 2;
176const S32 OBJECT_POS = 3;
177const S32 OBJECT_ROT = 4;
178const S32 OBJECT_VELOCITY = 5;
179const S32 OBJECT_OWNER = 6;
180const S32 OBJECT_GROUP = 7;
181const S32 OBJECT_CREATOR = 8;
182
183// llTextBox() magic token string - yes this is a hack.  sue me.
184char const* const TEXTBOX_MAGIC_TOKEN = "!!llTextBox!!";
185
186// changed() event flags
187const U32	CHANGED_NONE = 0x0;
188const U32	CHANGED_INVENTORY = 0x1;
189const U32	CHANGED_COLOR = 0x2;
190const U32	CHANGED_SHAPE = 0x4;
191const U32	CHANGED_SCALE = 0x8;
192const U32	CHANGED_TEXTURE = 0x10;
193const U32	CHANGED_LINK = 0x20;
194const U32	CHANGED_ALLOWED_DROP = 0x40;
195const U32	CHANGED_OWNER = 0x80;
196const U32	CHANGED_REGION = 0x100;
197const U32	CHANGED_TELEPORT = 0x200;
198const U32	CHANGED_REGION_START = 0x400;
199const U32   CHANGED_MEDIA = 0x800;
200
201// Possible error results
202const U32 LSL_STATUS_OK                 = 0;
203const U32 LSL_STATUS_MALFORMED_PARAMS   = 1000;
204const U32 LSL_STATUS_TYPE_MISMATCH      = 1001;
205const U32 LSL_STATUS_BOUNDS_ERROR       = 1002;
206const U32 LSL_STATUS_NOT_FOUND          = 1003;
207const U32 LSL_STATUS_NOT_SUPPORTED      = 1004;
208const U32 LSL_STATUS_INTERNAL_ERROR     = 1999;
209
210// Start per-function errors below, starting at 2000:
211const U32 LSL_STATUS_WHITELIST_FAILED   = 2001;
212
213#endif