diff options
author | Adam Frisby | 2007-08-15 16:57:01 +0000 |
---|---|---|
committer | Adam Frisby | 2007-08-15 16:57:01 +0000 |
commit | 226339cd400bd6d74218c0d067a2671b91a7a802 (patch) | |
tree | 805eefe9ef4476e0d20f80d4e4a260acdf42eab0 /OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL | |
parent | * Fixed bug with llModPow (diff) | |
download | opensim-SC-226339cd400bd6d74218c0d067a2671b91a7a802.zip opensim-SC-226339cd400bd6d74218c0d067a2671b91a7a802.tar.gz opensim-SC-226339cd400bd6d74218c0d067a2671b91a7a802.tar.bz2 opensim-SC-226339cd400bd6d74218c0d067a2671b91a7a802.tar.xz |
* Applying ckrinke's LSL baseclass changes (Thanks!)
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs | 102 |
1 files changed, 54 insertions, 48 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs index b411a20..4af438a 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs | |||
@@ -20,25 +20,20 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
20 | return; | 20 | return; |
21 | } | 21 | } |
22 | 22 | ||
23 | // | 23 | //These are the implementations of the various ll-functions used by the LSL scripts. |
24 | // IMPLEMENT THESE! | 24 | //starting out, we use the System.Math library for trig functions. - CFK 8-14-07 |
25 | // | 25 | public float llSin(float f) { return (float)Math.Sin(f); } |
26 | 26 | public float llCos(float f) { return (float)Math.Cos(f); } | |
27 | 27 | public float llTan(float f) { return (float)Math.Tan(f); } | |
28 | 28 | public float llAtan2(float x, float y) { return (float)Math.Atan2(y, x); } | |
29 | 29 | public float llSqrt(float f) { return (float)Math.Sqrt(f); } | |
30 | public float llSin(float f) { return 0; } | 30 | public float llPow(float fbase, float fexponent) { return (float)Math.Pow(fbase, fexponent); } |
31 | public float llCos(float f) { return 0; } | 31 | public Int32 llAbs(Int32 i) { return (Int32)Math.Abs(i); } |
32 | public float llTan(float f) { return 0; } | 32 | public float llFabs(float f) { return (float)Math.Abs(f); } |
33 | public float llAtan2(float x, float y) { return 0; } | ||
34 | public float llSqrt(float f) { return 0; } | ||
35 | public float llPow(float fbase, float fexponent) { return 0; } | ||
36 | public UInt32 llAbs(Int32 i) { return 0; } | ||
37 | public float llFabs(float f) { return 0; } | ||
38 | public float llFrand(float mag) { return 0; } | 33 | public float llFrand(float mag) { return 0; } |
39 | public UInt32 llFloor(float f) { return 0; } | 34 | public Int32 llFloor(float f) { return (Int32)Math.Floor(f); } |
40 | public UInt32 llCeil(float f) { return 0; } | 35 | public Int32 llCeil(float f) { return (Int32)Math.Ceiling(f); } |
41 | public UInt32 llRound(float f) { return 0; } | 36 | public Int32 llRound(float f) { return (Int32)Math.Round(f, 1); } |
42 | public float llVecMag(Axiom.Math.Vector3 v) { return 0; } | 37 | public float llVecMag(Axiom.Math.Vector3 v) { return 0; } |
43 | public Axiom.Math.Vector3 llVecNorm(Axiom.Math.Vector3 v) { return new Axiom.Math.Vector3(); } | 38 | public Axiom.Math.Vector3 llVecNorm(Axiom.Math.Vector3 v) { return new Axiom.Math.Vector3(); } |
44 | public float llVecDist(Axiom.Math.Vector3 a, Axiom.Math.Vector3 b) { return 0; } | 39 | public float llVecDist(Axiom.Math.Vector3 a, Axiom.Math.Vector3 b) { return 0; } |
@@ -233,24 +228,34 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
233 | public Int32 llSubStringIndex(string source, string pattern) { return 0; } | 228 | public Int32 llSubStringIndex(string source, string pattern) { return 0; } |
234 | public string llGetOwnerKey(string id) { return ""; } | 229 | public string llGetOwnerKey(string id) { return ""; } |
235 | public Axiom.Math.Vector3 llGetCenterOfMass() { return new Axiom.Math.Vector3(); } | 230 | public Axiom.Math.Vector3 llGetCenterOfMass() { return new Axiom.Math.Vector3(); } |
236 | public void llListSort() { } | 231 | public List<string> llListSort(List<string> src, Int32 stride, Int32 ascending) |
237 | public void llGetListLength() { } | 232 | { return new List<string>(); } |
238 | public void llList2Integer() { } | 233 | public Int32 llGetListLength(List<string> src) { return 0; } |
239 | public void llList2Float() { } | 234 | public Int32 llList2Integer(List<string> src, Int32 index) { return 0;} |
240 | public void llList2String() { } | 235 | public float llList2Float(List<string> src, Int32 index) { return 0; } |
241 | public void llList2Key() { } | 236 | public string llList2String(List<string> src, Int32 index) { return ""; } |
242 | public void llList2Vector() { } | 237 | public string llList2Key(List<string> src, Int32 index) { return ""; } |
243 | public void llList2Rot() { } | 238 | public Axiom.Math.Vector3 llList2Vector(List<string> src, Int32 index) |
244 | public void llList2List() { } | 239 | { return new Axiom.Math.Vector3(); } |
245 | public void llDeleteSubList() { } | 240 | public Axiom.Math.Quaternion llList2Rot(List<string> src, Int32 index) |
246 | public void llGetListEntryType() { } | 241 | { return new Axiom.Math.Quaternion(); } |
247 | public void llList2CSV() { } | 242 | public List<string> llList2List(List<string> src, Int32 start, Int32 end) |
248 | public void llCSV2List() { } | 243 | { return new List<string>(); } |
249 | public void llListRandomize() { } | 244 | public List<string> llDeleteSubList(List<string> src, Int32 start, Int32 end) |
250 | public void llList2ListStrided() { } | 245 | { return new List<string>(); } |
251 | public void llGetRegionCorner() { } | 246 | public Int32 llGetListEntryType(List<string> src, Int32 index) { return 0; } |
252 | public void llListInsertList() { } | 247 | public string llList2CSV(List<string> src) { return ""; } |
253 | public void llListFindList() { } | 248 | public List<string> llCSV2List(string src) |
249 | { return new List<string>(); } | ||
250 | public List<string> llListRandomize(List<string> src, Int32 stride) | ||
251 | { return new List<string>(); } | ||
252 | public List<string> llList2ListStrided(List<string> src, Int32 start, Int32 end, Int32 stride) | ||
253 | { return new List<string>(); } | ||
254 | public Axiom.Math.Vector3 llGetRegionCorner() | ||
255 | { return new Axiom.Math.Vector3(); } | ||
256 | public List<string> llListInsertList(List<string> dest, List<string> src, Int32 start) | ||
257 | { return new List<string>(); } | ||
258 | public Int32 llListFindList(List<string> src, List<string> test) { return 0; } | ||
254 | public string llGetObjectName() { return ""; } | 259 | public string llGetObjectName() { return ""; } |
255 | public void llSetObjectName(string name) { } | 260 | public void llSetObjectName(string name) { } |
256 | public string llGetDate() { return ""; } | 261 | public string llGetDate() { return ""; } |
@@ -300,7 +305,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
300 | public void llSetCameraAtOffset(Axiom.Math.Vector3 offset) { } | 305 | public void llSetCameraAtOffset(Axiom.Math.Vector3 offset) { } |
301 | public void llDumpList2String() { } | 306 | public void llDumpList2String() { } |
302 | public void llScriptDanger(Axiom.Math.Vector3 pos) { } | 307 | public void llScriptDanger(Axiom.Math.Vector3 pos) { } |
303 | public void llDialog() { } | 308 | public void llDialog(string avatar, string message, List<string> buttons, Int32 chat_channel) { } |
304 | public void llVolumeDetect(Int32 detect) { } | 309 | public void llVolumeDetect(Int32 detect) { } |
305 | public void llResetOtherScript(string name) { } | 310 | public void llResetOtherScript(string name) { } |
306 | public Int32 llGetScriptState(string name) { return 0; } | 311 | public Int32 llGetScriptState(string name) { return 0; } |
@@ -314,14 +319,14 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
314 | public string llMD5String(string src, Int32 nonce) { | 319 | public string llMD5String(string src, Int32 nonce) { |
315 | return OpenSim.Framework.Utilities.Util.Md5Hash(src + ":" + nonce.ToString()); | 320 | return OpenSim.Framework.Utilities.Util.Md5Hash(src + ":" + nonce.ToString()); |
316 | } | 321 | } |
317 | public void llSetPrimitiveParams() { } | 322 | public void llSetPrimitiveParams(List<string> rules) { } |
318 | public string llStringToBase64(string str) { return ""; } | 323 | public string llStringToBase64(string str) { return ""; } |
319 | public string llBase64ToString(string str) { return ""; } | 324 | public string llBase64ToString(string str) { return ""; } |
320 | public void llXorBase64Strings() { } | 325 | public void llXorBase64Strings() { } |
321 | public void llRemoteDataSetRegion() { } | 326 | public void llRemoteDataSetRegion() { } |
322 | public float llLog10(float val) { return 0; } | 327 | public float llLog10(float val) { return (float)Math.Log10(val); } |
323 | public float llLog(float val) { return 0; } | 328 | public float llLog(float val) { return (float)Math.Log(val); } |
324 | public void llGetAnimationList() { } | 329 | public List<string> llGetAnimationList(string id) { return new List<string>(); } |
325 | public void llSetParcelMusicURL(string url) { } | 330 | public void llSetParcelMusicURL(string url) { } |
326 | public Axiom.Math.Vector3 llGetRootPosition() { return new Axiom.Math.Vector3(); } | 331 | public Axiom.Math.Vector3 llGetRootPosition() { return new Axiom.Math.Vector3(); } |
327 | public Axiom.Math.Quaternion llGetRootRotation() { return new Axiom.Math.Quaternion(); } | 332 | public Axiom.Math.Quaternion llGetRootRotation() { return new Axiom.Math.Quaternion(); } |
@@ -332,7 +337,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
332 | public void llSetLinkAlpha(Int32 linknumber, float alpha, Int32 face) { } | 337 | public void llSetLinkAlpha(Int32 linknumber, float alpha, Int32 face) { } |
333 | public Int32 llGetNumberOfPrims() { return 0; } | 338 | public Int32 llGetNumberOfPrims() { return 0; } |
334 | public string llGetNumberOfNotecardLines(string name) { return ""; } | 339 | public string llGetNumberOfNotecardLines(string name) { return ""; } |
335 | public void llGetBoundingBox() { } | 340 | public List<string> llGetBoundingBox(string obj) { return new List<string>(); } |
336 | public Axiom.Math.Vector3 llGetGeometricCenter() { return new Axiom.Math.Vector3(); } | 341 | public Axiom.Math.Vector3 llGetGeometricCenter() { return new Axiom.Math.Vector3(); } |
337 | public void llGetPrimitiveParams() { } | 342 | public void llGetPrimitiveParams() { } |
338 | public string llIntegerToBase64(Int32 number) { return ""; } | 343 | public string llIntegerToBase64(Int32 number) { return ""; } |
@@ -340,7 +345,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
340 | public float llGetGMTclock() { return 0; } | 345 | public float llGetGMTclock() { return 0; } |
341 | public string llGetSimulatorHostname() { return ""; } | 346 | public string llGetSimulatorHostname() { return ""; } |
342 | public void llSetLocalRot(Axiom.Math.Quaternion rot) { } | 347 | public void llSetLocalRot(Axiom.Math.Quaternion rot) { } |
343 | public void llParseStringKeepNulls() { } | 348 | public List<string> llParseStringKeepNulls(string src, List<string> seperators, List<string> spacers) |
349 | { return new List<string>(); } | ||
344 | public void llRezAtRoot(string inventory, Axiom.Math.Vector3 position, Axiom.Math.Vector3 velocity, Axiom.Math.Quaternion rot, Int32 param) { } | 350 | public void llRezAtRoot(string inventory, Axiom.Math.Vector3 position, Axiom.Math.Vector3 velocity, Axiom.Math.Quaternion rot, Int32 param) { } |
345 | public Int32 llGetObjectPermMask(Int32 mask) { return 0; } | 351 | public Int32 llGetObjectPermMask(Int32 mask) { return 0; } |
346 | public void llSetObjectPermMask(Int32 mask, Int32 value) { } | 352 | public void llSetObjectPermMask(Int32 mask, Int32 value) { } |
@@ -353,7 +359,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
353 | public float llGetObjectMass(string id) { return 0; } | 359 | public float llGetObjectMass(string id) { return 0; } |
354 | public void llListReplaceList() { } | 360 | public void llListReplaceList() { } |
355 | public void llLoadURL(string avatar_id, string message, string url) { } | 361 | public void llLoadURL(string avatar_id, string message, string url) { } |
356 | public void llParcelMediaCommandList() { } | 362 | public void llParcelMediaCommandList(List<string> commandList) { } |
357 | public void llParcelMediaQuery() { } | 363 | public void llParcelMediaQuery() { } |
358 | 364 | ||
359 | public Int32 llModPow(Int32 a, Int32 b, Int32 c) { | 365 | public Int32 llModPow(Int32 a, Int32 b, Int32 c) { |
@@ -364,7 +370,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
364 | } | 370 | } |
365 | 371 | ||
366 | public Int32 llGetInventoryType(string name) { return 0; } | 372 | public Int32 llGetInventoryType(string name) { return 0; } |
367 | public void llSetPayPrice() { } | 373 | public void llSetPayPrice(Int32 price, List<string> quick_pay_buttons) { } |
368 | public Axiom.Math.Vector3 llGetCameraPos() { return new Axiom.Math.Vector3(); } | 374 | public Axiom.Math.Vector3 llGetCameraPos() { return new Axiom.Math.Vector3(); } |
369 | public Axiom.Math.Quaternion llGetCameraRot() { return new Axiom.Math.Quaternion(); } | 375 | public Axiom.Math.Quaternion llGetCameraRot() { return new Axiom.Math.Quaternion(); } |
370 | public void llSetPrimURL() { } | 376 | public void llSetPrimURL() { } |
@@ -375,9 +381,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
375 | public void llAddToLandBanList(string avatar, float hours) { } | 381 | public void llAddToLandBanList(string avatar, float hours) { } |
376 | public void llRemoveFromLandPassList(string avatar) { } | 382 | public void llRemoveFromLandPassList(string avatar) { } |
377 | public void llRemoveFromLandBanList(string avatar) { } | 383 | public void llRemoveFromLandBanList(string avatar) { } |
378 | public void llSetCameraParams() { } | 384 | public void llSetCameraParams(List<string> rules) { } |
379 | public void llClearCameraParams() { } | 385 | public void llClearCameraParams() { } |
380 | public void llListStatistics() { } | 386 | public float llListStatistics(Int32 operation, List<string> src) { return 0; } |
381 | public Int32 llGetUnixTime() { | 387 | public Int32 llGetUnixTime() { |
382 | return OpenSim.Framework.Utilities.Util.UnixTimeSinceEpoch(); | 388 | return OpenSim.Framework.Utilities.Util.UnixTimeSinceEpoch(); |
383 | } | 389 | } |
@@ -388,7 +394,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
388 | public void llResetLandBanList() { } | 394 | public void llResetLandBanList() { } |
389 | public void llResetLandPassList() { } | 395 | public void llResetLandPassList() { } |
390 | public Int32 llGetParcelPrimCount(Axiom.Math.Vector3 pos, Int32 category, Int32 sim_wide) { return 0; } | 396 | public Int32 llGetParcelPrimCount(Axiom.Math.Vector3 pos, Int32 category, Int32 sim_wide) { return 0; } |
391 | public void llGetParcelPrimOwners() { } | 397 | public List<string> llGetParcelPrimOwners(Axiom.Math.Vector3 pos) { return new List<string>(); } |
392 | public Int32 llGetObjectPrimCount(string object_id) { return 0; } | 398 | public Int32 llGetObjectPrimCount(string object_id) { return 0; } |
393 | public Int32 llGetParcelMaxPrims(Axiom.Math.Vector3 pos, Int32 sim_wide) { return 0; } | 399 | public Int32 llGetParcelMaxPrims(Axiom.Math.Vector3 pos, Int32 sim_wide) { return 0; } |
394 | public List<string> llGetParcelDetails(Axiom.Math.Vector3 pos, List<string> param) { return new List<string>(); } | 400 | public List<string> llGetParcelDetails(Axiom.Math.Vector3 pos, List<string> param) { return new List<string>(); } |