PageRenderTime 46ms CodeModel.GetById 22ms 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
Possible License(s): LGPL-2.1
  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. #ifndef LL_LLLSLCONSTANTS_H
  28. #define LL_LLLSLCONSTANTS_H
  29. // LSL: Return flags for llGetAgentInfo
  30. const U32 AGENT_FLYING = 0x0001;
  31. const U32 AGENT_ATTACHMENTS = 0x0002;
  32. const U32 AGENT_SCRIPTED = 0x0004;
  33. const U32 AGENT_MOUSELOOK = 0x0008;
  34. const U32 AGENT_SITTING = 0x0010;
  35. const U32 AGENT_ON_OBJECT = 0x0020;
  36. const U32 AGENT_AWAY = 0x0040;
  37. const U32 AGENT_WALKING = 0x0080;
  38. const U32 AGENT_IN_AIR = 0x0100;
  39. const U32 AGENT_TYPING = 0x0200;
  40. const U32 AGENT_CROUCHING = 0x0400;
  41. const U32 AGENT_BUSY = 0x0800;
  42. const U32 AGENT_ALWAYS_RUN = 0x1000;
  43. const U32 AGENT_AUTOPILOT = 0x2000;
  44. const S32 LSL_REMOTE_DATA_CHANNEL = 1;
  45. const S32 LSL_REMOTE_DATA_REQUEST = 2;
  46. const S32 LSL_REMOTE_DATA_REPLY = 3;
  47. // Constants used in extended LSL primitive setter and getters
  48. const S32 LSL_PRIM_TYPE_LEGACY = 1; // No longer supported.
  49. const S32 LSL_PRIM_MATERIAL = 2;
  50. const S32 LSL_PRIM_PHYSICS = 3;
  51. const S32 LSL_PRIM_TEMP_ON_REZ = 4;
  52. const S32 LSL_PRIM_PHANTOM = 5;
  53. const S32 LSL_PRIM_POSITION = 6;
  54. const S32 LSL_PRIM_SIZE = 7;
  55. const S32 LSL_PRIM_ROTATION = 8;
  56. const S32 LSL_PRIM_TYPE = 9; // Replacement for LSL_PRIM_TYPE_LEGACY
  57. const S32 LSL_PRIM_TEXTURE = 17;
  58. const S32 LSL_PRIM_COLOR = 18;
  59. const S32 LSL_PRIM_BUMP_SHINY = 19;
  60. const S32 LSL_PRIM_FULLBRIGHT = 20;
  61. const S32 LSL_PRIM_FLEXIBLE = 21;
  62. const S32 LSL_PRIM_TEXGEN = 22;
  63. const S32 LSL_PRIM_POINT_LIGHT = 23;
  64. const S32 LSL_PRIM_CAST_SHADOWS = 24;
  65. const S32 LSL_PRIM_GLOW = 25;
  66. const S32 LSL_PRIM_TYPE_BOX = 0;
  67. const S32 LSL_PRIM_TYPE_CYLINDER= 1;
  68. const S32 LSL_PRIM_TYPE_PRISM = 2;
  69. const S32 LSL_PRIM_TYPE_SPHERE = 3;
  70. const S32 LSL_PRIM_TYPE_TORUS = 4;
  71. const S32 LSL_PRIM_TYPE_TUBE = 5;
  72. const S32 LSL_PRIM_TYPE_RING = 6;
  73. const S32 LSL_PRIM_TYPE_SCULPT = 7;
  74. const S32 LSL_PRIM_HOLE_DEFAULT = 0x00;
  75. const S32 LSL_PRIM_HOLE_CIRCLE = 0x10;
  76. const S32 LSL_PRIM_HOLE_SQUARE = 0x20;
  77. const S32 LSL_PRIM_HOLE_TRIANGLE= 0x30;
  78. const S32 LSL_PRIM_MATERIAL_STONE = 0;
  79. const S32 LSL_PRIM_MATERIAL_METAL = 1;
  80. const S32 LSL_PRIM_MATERIAL_GLASS = 2;
  81. const S32 LSL_PRIM_MATERIAL_WOOD = 3;
  82. const S32 LSL_PRIM_MATERIAL_FLESH = 4;
  83. const S32 LSL_PRIM_MATERIAL_PLASTIC = 5;
  84. const S32 LSL_PRIM_MATERIAL_RUBBER = 6;
  85. const S32 LSL_PRIM_MATERIAL_LIGHT = 7;
  86. const S32 LSL_PRIM_SHINY_NONE = 0;
  87. const S32 LSL_PRIM_SHINY_LOW = 1;
  88. const S32 LSL_PRIM_SHINY_MEDIUM = 2;
  89. const S32 LSL_PRIM_SHINY_HIGH = 3;
  90. const S32 LSL_PRIM_TEXGEN_DEFAULT = 0;
  91. const S32 LSL_PRIM_TEXGEN_PLANAR = 1;
  92. const S32 LSL_PRIM_BUMP_NONE = 0;
  93. const S32 LSL_PRIM_BUMP_BRIGHT = 1;
  94. const S32 LSL_PRIM_BUMP_DARK = 2;
  95. const S32 LSL_PRIM_BUMP_WOOD = 3;
  96. const S32 LSL_PRIM_BUMP_BARK = 4;
  97. const S32 LSL_PRIM_BUMP_BRICKS = 5;
  98. const S32 LSL_PRIM_BUMP_CHECKER = 6;
  99. const S32 LSL_PRIM_BUMP_CONCRETE = 7;
  100. const S32 LSL_PRIM_BUMP_TILE = 8;
  101. const S32 LSL_PRIM_BUMP_STONE = 9;
  102. const S32 LSL_PRIM_BUMP_DISKS = 10;
  103. const S32 LSL_PRIM_BUMP_GRAVEL = 11;
  104. const S32 LSL_PRIM_BUMP_BLOBS = 12;
  105. const S32 LSL_PRIM_BUMP_SIDING = 13;
  106. const S32 LSL_PRIM_BUMP_LARGETILE = 14;
  107. const S32 LSL_PRIM_BUMP_STUCCO = 15;
  108. const S32 LSL_PRIM_BUMP_SUCTION = 16;
  109. const S32 LSL_PRIM_BUMP_WEAVE = 17;
  110. const S32 LSL_PRIM_SCULPT_TYPE_SPHERE = 1;
  111. const S32 LSL_PRIM_SCULPT_TYPE_TORUS = 2;
  112. const S32 LSL_PRIM_SCULPT_TYPE_PLANE = 3;
  113. const S32 LSL_PRIM_SCULPT_TYPE_CYLINDER = 4;
  114. const S32 LSL_PRIM_SCULPT_TYPE_MASK = 7;
  115. const S32 LSL_PRIM_SCULPT_FLAG_INVERT = 64;
  116. const S32 LSL_PRIM_SCULPT_FLAG_MIRROR = 128;
  117. const S32 LSL_ALL_SIDES = -1;
  118. const S32 LSL_LINK_ROOT = 1;
  119. const S32 LSL_LINK_FIRST_CHILD = 2;
  120. const S32 LSL_LINK_SET = -1;
  121. const S32 LSL_LINK_ALL_OTHERS = -2;
  122. const S32 LSL_LINK_ALL_CHILDREN = -3;
  123. const S32 LSL_LINK_THIS = -4;
  124. // LSL constants for llSetForSell
  125. const S32 SELL_NOT = 0;
  126. const S32 SELL_ORIGINAL = 1;
  127. const S32 SELL_COPY = 2;
  128. const S32 SELL_CONTENTS = 3;
  129. // LSL constants for llSetPayPrice
  130. const S32 PAY_PRICE_HIDE = -1;
  131. const S32 PAY_PRICE_DEFAULT = -2;
  132. const S32 MAX_PAY_BUTTONS = 4;
  133. const S32 PAY_BUTTON_DEFAULT_0 = 1;
  134. const S32 PAY_BUTTON_DEFAULT_1 = 5;
  135. const S32 PAY_BUTTON_DEFAULT_2 = 10;
  136. const S32 PAY_BUTTON_DEFAULT_3 = 20;
  137. // lsl email registration.
  138. const S32 EMAIL_REG_SUBSCRIBE_OBJECT = 0x01;
  139. const S32 EMAIL_REG_UNSUBSCRIBE_OBJECT = 0x02;
  140. const S32 EMAIL_REG_UNSUBSCRIBE_SIM = 0x04;
  141. const S32 LIST_STAT_RANGE = 0;
  142. const S32 LIST_STAT_MIN = 1;
  143. const S32 LIST_STAT_MAX = 2;
  144. const S32 LIST_STAT_MEAN = 3;
  145. const S32 LIST_STAT_MEDIAN = 4;
  146. const S32 LIST_STAT_STD_DEV = 5;
  147. const S32 LIST_STAT_SUM = 6;
  148. const S32 LIST_STAT_SUM_SQUARES = 7;
  149. const S32 LIST_STAT_NUM_COUNT = 8;
  150. const S32 LIST_STAT_GEO_MEAN = 9;
  151. const S32 STRING_TRIM_HEAD = 0x01;
  152. const S32 STRING_TRIM_TAIL = 0x02;
  153. const S32 STRING_TRIM = STRING_TRIM_HEAD | STRING_TRIM_TAIL;
  154. // llGetObjectDetails
  155. const S32 OBJECT_UNKNOWN_DETAIL = -1;
  156. const S32 OBJECT_NAME = 1;
  157. const S32 OBJECT_DESC = 2;
  158. const S32 OBJECT_POS = 3;
  159. const S32 OBJECT_ROT = 4;
  160. const S32 OBJECT_VELOCITY = 5;
  161. const S32 OBJECT_OWNER = 6;
  162. const S32 OBJECT_GROUP = 7;
  163. const S32 OBJECT_CREATOR = 8;
  164. // llTextBox() magic token string - yes this is a hack. sue me.
  165. char const* const TEXTBOX_MAGIC_TOKEN = "!!llTextBox!!";
  166. // changed() event flags
  167. const U32 CHANGED_NONE = 0x0;
  168. const U32 CHANGED_INVENTORY = 0x1;
  169. const U32 CHANGED_COLOR = 0x2;
  170. const U32 CHANGED_SHAPE = 0x4;
  171. const U32 CHANGED_SCALE = 0x8;
  172. const U32 CHANGED_TEXTURE = 0x10;
  173. const U32 CHANGED_LINK = 0x20;
  174. const U32 CHANGED_ALLOWED_DROP = 0x40;
  175. const U32 CHANGED_OWNER = 0x80;
  176. const U32 CHANGED_REGION = 0x100;
  177. const U32 CHANGED_TELEPORT = 0x200;
  178. const U32 CHANGED_REGION_START = 0x400;
  179. const U32 CHANGED_MEDIA = 0x800;
  180. // Possible error results
  181. const U32 LSL_STATUS_OK = 0;
  182. const U32 LSL_STATUS_MALFORMED_PARAMS = 1000;
  183. const U32 LSL_STATUS_TYPE_MISMATCH = 1001;
  184. const U32 LSL_STATUS_BOUNDS_ERROR = 1002;
  185. const U32 LSL_STATUS_NOT_FOUND = 1003;
  186. const U32 LSL_STATUS_NOT_SUPPORTED = 1004;
  187. const U32 LSL_STATUS_INTERNAL_ERROR = 1999;
  188. // Start per-function errors below, starting at 2000:
  189. const U32 LSL_STATUS_WHITELIST_FAILED = 2001;
  190. #endif