mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 03:06:05 +08:00
mass update of files to have native line endings
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,299 +1,299 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Axiom.Math;
|
||||
using libsecondlife;
|
||||
using libsecondlife.Packets;
|
||||
using OpenSim.Framework.Interfaces;
|
||||
using OpenSim.Framework.Types;
|
||||
using OpenSim.Physics.Manager;
|
||||
|
||||
namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
// public delegate void PrimCountTaintedDelegate();
|
||||
|
||||
public class AllNewSceneObjectGroup2 : EntityBase
|
||||
{
|
||||
private Encoding enc = Encoding.ASCII;
|
||||
|
||||
protected AllNewSceneObjectPart2 m_rootPart;
|
||||
protected Dictionary<LLUUID, AllNewSceneObjectPart2> m_parts = new Dictionary<LLUUID, AllNewSceneObjectPart2>();
|
||||
|
||||
public event PrimCountTaintedDelegate OnPrimCountTainted;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int primCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public LLVector3 GroupCentrePoint
|
||||
{
|
||||
get
|
||||
{
|
||||
return new LLVector3(0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public AllNewSceneObjectGroup2()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void FlagGroupForFullUpdate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void FlagGroupForTerseUpdate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="objectGroup"></param>
|
||||
public void LinkToGroup(AllNewSceneObjectGroup2 objectGroup)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="primID"></param>
|
||||
/// <returns></returns>
|
||||
private AllNewSceneObjectPart2 GetChildPrim(LLUUID primID)
|
||||
{
|
||||
AllNewSceneObjectPart2 childPart = null;
|
||||
if (this.m_parts.ContainsKey(primID))
|
||||
{
|
||||
childPart = this.m_parts[primID];
|
||||
}
|
||||
return childPart;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="localID"></param>
|
||||
/// <returns></returns>
|
||||
private AllNewSceneObjectPart2 GetChildPrim(uint localID)
|
||||
{
|
||||
foreach (AllNewSceneObjectPart2 part in this.m_parts.Values)
|
||||
{
|
||||
if (part.m_localID == localID)
|
||||
{
|
||||
return part;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void TriggerTainted()
|
||||
{
|
||||
if (OnPrimCountTainted != null)
|
||||
{
|
||||
this.OnPrimCountTainted();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="offset"></param>
|
||||
/// <param name="pos"></param>
|
||||
/// <param name="remoteClient"></param>
|
||||
public void GrapMovement(LLVector3 offset, LLVector3 pos, IClientAPI remoteClient)
|
||||
{
|
||||
this.Pos = pos;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
public void GetProperites(IClientAPI client)
|
||||
{
|
||||
ObjectPropertiesPacket proper = new ObjectPropertiesPacket();
|
||||
proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1];
|
||||
proper.ObjectData[0] = new ObjectPropertiesPacket.ObjectDataBlock();
|
||||
proper.ObjectData[0].ItemID = LLUUID.Zero;
|
||||
proper.ObjectData[0].CreationDate = (ulong)this.m_rootPart.CreationDate;
|
||||
proper.ObjectData[0].CreatorID = this.m_rootPart.CreatorID;
|
||||
proper.ObjectData[0].FolderID = LLUUID.Zero;
|
||||
proper.ObjectData[0].FromTaskID = LLUUID.Zero;
|
||||
proper.ObjectData[0].GroupID = LLUUID.Zero;
|
||||
proper.ObjectData[0].InventorySerial = 0;
|
||||
proper.ObjectData[0].LastOwnerID = this.m_rootPart.LastOwnerID;
|
||||
proper.ObjectData[0].ObjectID = this.m_uuid;
|
||||
proper.ObjectData[0].OwnerID = this.m_rootPart.OwnerID;
|
||||
proper.ObjectData[0].TouchName = enc.GetBytes(this.m_rootPart.TouchName + "\0");
|
||||
proper.ObjectData[0].TextureID = new byte[0];
|
||||
proper.ObjectData[0].SitName = enc.GetBytes(this.m_rootPart.SitName + "\0");
|
||||
proper.ObjectData[0].Name = enc.GetBytes(this.m_rootPart.Name + "\0");
|
||||
proper.ObjectData[0].Description = enc.GetBytes(this.m_rootPart.Description + "\0");
|
||||
proper.ObjectData[0].OwnerMask = this.m_rootPart.OwnerMask;
|
||||
proper.ObjectData[0].NextOwnerMask = this.m_rootPart.NextOwnerMask;
|
||||
proper.ObjectData[0].GroupMask = this.m_rootPart.GroupMask;
|
||||
proper.ObjectData[0].EveryoneMask = this.m_rootPart.EveryoneMask;
|
||||
proper.ObjectData[0].BaseMask = this.m_rootPart.BaseMask;
|
||||
|
||||
client.OutPacket(proper);
|
||||
}
|
||||
|
||||
#region Shape
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="shapeBlock"></param>
|
||||
public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock, uint localID)
|
||||
{
|
||||
AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
|
||||
if (part != null)
|
||||
{
|
||||
part.UpdateShape(shapeBlock);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Position
|
||||
public void UpdateGroupPosition(LLVector3 pos)
|
||||
{
|
||||
this.m_pos = pos;
|
||||
}
|
||||
|
||||
public void UpdateSinglePosition(LLVector3 pos, uint localID)
|
||||
{
|
||||
AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
|
||||
if (part != null)
|
||||
{
|
||||
if (part.uuid == this.m_rootPart.uuid)
|
||||
{
|
||||
this.UpdateRootPosition(pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
part.UpdateOffSet(pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateRootPosition(LLVector3 pos)
|
||||
{
|
||||
LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
|
||||
LLVector3 oldPos = new LLVector3(this.Pos.X + this.m_rootPart.OffsetPosition.X, this.Pos.Y + this.m_rootPart.OffsetPosition.Y, this.Pos.Z + this.m_rootPart.OffsetPosition.Z);
|
||||
LLVector3 diff = oldPos - newPos;
|
||||
Axiom.Math.Vector3 axDiff = new Vector3(diff.X, diff.Y, diff.Z);
|
||||
Axiom.Math.Quaternion partRotation = new Quaternion(this.m_rootPart.RotationOffset.W, this.m_rootPart.RotationOffset.X, this.m_rootPart.RotationOffset.Y, this.m_rootPart.RotationOffset.Z);
|
||||
axDiff = partRotation.Inverse() * axDiff;
|
||||
diff.X = axDiff.x;
|
||||
diff.Y = axDiff.y;
|
||||
diff.Z = axDiff.z;
|
||||
|
||||
foreach (AllNewSceneObjectPart2 obPart in this.m_parts.Values)
|
||||
{
|
||||
if (obPart.uuid != this.m_rootPart.uuid)
|
||||
{
|
||||
obPart.OffsetPosition = obPart.OffsetPosition + diff;
|
||||
}
|
||||
}
|
||||
this.Pos = newPos;
|
||||
pos.X = newPos.X;
|
||||
pos.Y = newPos.Y;
|
||||
pos.Z = newPos.Z;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Roation
|
||||
public void UpdateGroupRotation(LLQuaternion rot)
|
||||
{
|
||||
this.m_rootPart.UpdateRotation(rot);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="pos"></param>
|
||||
/// <param name="rot"></param>
|
||||
public void UpdateGroupRotation(LLVector3 pos, LLQuaternion rot)
|
||||
{
|
||||
this.m_rootPart.UpdateRotation(rot);
|
||||
this.m_pos = pos;
|
||||
}
|
||||
|
||||
public void UpdateSingleRotation(LLQuaternion rot, uint localID)
|
||||
{
|
||||
AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
|
||||
if (part != null)
|
||||
{
|
||||
if (part.uuid == this.m_rootPart.uuid)
|
||||
{
|
||||
this.UpdateRootRotation(rot);
|
||||
}
|
||||
else
|
||||
{
|
||||
part.UpdateRotation(rot);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void UpdateRootRotation(LLQuaternion rot)
|
||||
{
|
||||
this.m_rootPart.UpdateRotation(rot);
|
||||
Axiom.Math.Quaternion axRot = new Quaternion(rot.W, rot.X, rot.Y, rot.Z);
|
||||
Axiom.Math.Quaternion oldParentRot = new Quaternion(this.m_rootPart.RotationOffset.W, this.m_rootPart.RotationOffset.X, this.m_rootPart.RotationOffset.Y, this.m_rootPart.RotationOffset.Z);
|
||||
|
||||
foreach (AllNewSceneObjectPart2 prim in this.m_parts.Values)
|
||||
{
|
||||
if (prim.uuid != this.m_rootPart.uuid)
|
||||
{
|
||||
Vector3 axPos = new Vector3(prim.OffsetPosition.X, prim.OffsetPosition.Y, prim.OffsetPosition.Z);
|
||||
axPos = oldParentRot * axPos;
|
||||
axPos = axRot.Inverse() * axPos;
|
||||
prim.OffsetPosition = new LLVector3(axPos.x, axPos.y, axPos.z);
|
||||
Axiom.Math.Quaternion primsRot = new Quaternion(prim.RotationOffset.W, prim.RotationOffset.X, prim.RotationOffset.Y, prim.RotationOffset.Z);
|
||||
Axiom.Math.Quaternion newRot = oldParentRot * primsRot;
|
||||
newRot = axRot.Inverse() * newRot;
|
||||
prim.RotationOffset = new LLQuaternion(newRot.w, newRot.x, newRot.y, newRot.z);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="part"></param>
|
||||
private void SetPartAsRoot(AllNewSceneObjectPart2 part)
|
||||
{
|
||||
this.m_rootPart = part;
|
||||
this.m_uuid = part.uuid;
|
||||
this.m_localId = part.m_localID;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="part"></param>
|
||||
private void SetPartAsNonRoot(AllNewSceneObjectPart2 part)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Axiom.Math;
|
||||
using libsecondlife;
|
||||
using libsecondlife.Packets;
|
||||
using OpenSim.Framework.Interfaces;
|
||||
using OpenSim.Framework.Types;
|
||||
using OpenSim.Physics.Manager;
|
||||
|
||||
namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
// public delegate void PrimCountTaintedDelegate();
|
||||
|
||||
public class AllNewSceneObjectGroup2 : EntityBase
|
||||
{
|
||||
private Encoding enc = Encoding.ASCII;
|
||||
|
||||
protected AllNewSceneObjectPart2 m_rootPart;
|
||||
protected Dictionary<LLUUID, AllNewSceneObjectPart2> m_parts = new Dictionary<LLUUID, AllNewSceneObjectPart2>();
|
||||
|
||||
public event PrimCountTaintedDelegate OnPrimCountTainted;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int primCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public LLVector3 GroupCentrePoint
|
||||
{
|
||||
get
|
||||
{
|
||||
return new LLVector3(0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public AllNewSceneObjectGroup2()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void FlagGroupForFullUpdate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void FlagGroupForTerseUpdate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="objectGroup"></param>
|
||||
public void LinkToGroup(AllNewSceneObjectGroup2 objectGroup)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="primID"></param>
|
||||
/// <returns></returns>
|
||||
private AllNewSceneObjectPart2 GetChildPrim(LLUUID primID)
|
||||
{
|
||||
AllNewSceneObjectPart2 childPart = null;
|
||||
if (this.m_parts.ContainsKey(primID))
|
||||
{
|
||||
childPart = this.m_parts[primID];
|
||||
}
|
||||
return childPart;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="localID"></param>
|
||||
/// <returns></returns>
|
||||
private AllNewSceneObjectPart2 GetChildPrim(uint localID)
|
||||
{
|
||||
foreach (AllNewSceneObjectPart2 part in this.m_parts.Values)
|
||||
{
|
||||
if (part.m_localID == localID)
|
||||
{
|
||||
return part;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void TriggerTainted()
|
||||
{
|
||||
if (OnPrimCountTainted != null)
|
||||
{
|
||||
this.OnPrimCountTainted();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="offset"></param>
|
||||
/// <param name="pos"></param>
|
||||
/// <param name="remoteClient"></param>
|
||||
public void GrapMovement(LLVector3 offset, LLVector3 pos, IClientAPI remoteClient)
|
||||
{
|
||||
this.Pos = pos;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
public void GetProperites(IClientAPI client)
|
||||
{
|
||||
ObjectPropertiesPacket proper = new ObjectPropertiesPacket();
|
||||
proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1];
|
||||
proper.ObjectData[0] = new ObjectPropertiesPacket.ObjectDataBlock();
|
||||
proper.ObjectData[0].ItemID = LLUUID.Zero;
|
||||
proper.ObjectData[0].CreationDate = (ulong)this.m_rootPart.CreationDate;
|
||||
proper.ObjectData[0].CreatorID = this.m_rootPart.CreatorID;
|
||||
proper.ObjectData[0].FolderID = LLUUID.Zero;
|
||||
proper.ObjectData[0].FromTaskID = LLUUID.Zero;
|
||||
proper.ObjectData[0].GroupID = LLUUID.Zero;
|
||||
proper.ObjectData[0].InventorySerial = 0;
|
||||
proper.ObjectData[0].LastOwnerID = this.m_rootPart.LastOwnerID;
|
||||
proper.ObjectData[0].ObjectID = this.m_uuid;
|
||||
proper.ObjectData[0].OwnerID = this.m_rootPart.OwnerID;
|
||||
proper.ObjectData[0].TouchName = enc.GetBytes(this.m_rootPart.TouchName + "\0");
|
||||
proper.ObjectData[0].TextureID = new byte[0];
|
||||
proper.ObjectData[0].SitName = enc.GetBytes(this.m_rootPart.SitName + "\0");
|
||||
proper.ObjectData[0].Name = enc.GetBytes(this.m_rootPart.Name + "\0");
|
||||
proper.ObjectData[0].Description = enc.GetBytes(this.m_rootPart.Description + "\0");
|
||||
proper.ObjectData[0].OwnerMask = this.m_rootPart.OwnerMask;
|
||||
proper.ObjectData[0].NextOwnerMask = this.m_rootPart.NextOwnerMask;
|
||||
proper.ObjectData[0].GroupMask = this.m_rootPart.GroupMask;
|
||||
proper.ObjectData[0].EveryoneMask = this.m_rootPart.EveryoneMask;
|
||||
proper.ObjectData[0].BaseMask = this.m_rootPart.BaseMask;
|
||||
|
||||
client.OutPacket(proper);
|
||||
}
|
||||
|
||||
#region Shape
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="shapeBlock"></param>
|
||||
public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock, uint localID)
|
||||
{
|
||||
AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
|
||||
if (part != null)
|
||||
{
|
||||
part.UpdateShape(shapeBlock);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Position
|
||||
public void UpdateGroupPosition(LLVector3 pos)
|
||||
{
|
||||
this.m_pos = pos;
|
||||
}
|
||||
|
||||
public void UpdateSinglePosition(LLVector3 pos, uint localID)
|
||||
{
|
||||
AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
|
||||
if (part != null)
|
||||
{
|
||||
if (part.uuid == this.m_rootPart.uuid)
|
||||
{
|
||||
this.UpdateRootPosition(pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
part.UpdateOffSet(pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateRootPosition(LLVector3 pos)
|
||||
{
|
||||
LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
|
||||
LLVector3 oldPos = new LLVector3(this.Pos.X + this.m_rootPart.OffsetPosition.X, this.Pos.Y + this.m_rootPart.OffsetPosition.Y, this.Pos.Z + this.m_rootPart.OffsetPosition.Z);
|
||||
LLVector3 diff = oldPos - newPos;
|
||||
Axiom.Math.Vector3 axDiff = new Vector3(diff.X, diff.Y, diff.Z);
|
||||
Axiom.Math.Quaternion partRotation = new Quaternion(this.m_rootPart.RotationOffset.W, this.m_rootPart.RotationOffset.X, this.m_rootPart.RotationOffset.Y, this.m_rootPart.RotationOffset.Z);
|
||||
axDiff = partRotation.Inverse() * axDiff;
|
||||
diff.X = axDiff.x;
|
||||
diff.Y = axDiff.y;
|
||||
diff.Z = axDiff.z;
|
||||
|
||||
foreach (AllNewSceneObjectPart2 obPart in this.m_parts.Values)
|
||||
{
|
||||
if (obPart.uuid != this.m_rootPart.uuid)
|
||||
{
|
||||
obPart.OffsetPosition = obPart.OffsetPosition + diff;
|
||||
}
|
||||
}
|
||||
this.Pos = newPos;
|
||||
pos.X = newPos.X;
|
||||
pos.Y = newPos.Y;
|
||||
pos.Z = newPos.Z;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Roation
|
||||
public void UpdateGroupRotation(LLQuaternion rot)
|
||||
{
|
||||
this.m_rootPart.UpdateRotation(rot);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="pos"></param>
|
||||
/// <param name="rot"></param>
|
||||
public void UpdateGroupRotation(LLVector3 pos, LLQuaternion rot)
|
||||
{
|
||||
this.m_rootPart.UpdateRotation(rot);
|
||||
this.m_pos = pos;
|
||||
}
|
||||
|
||||
public void UpdateSingleRotation(LLQuaternion rot, uint localID)
|
||||
{
|
||||
AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
|
||||
if (part != null)
|
||||
{
|
||||
if (part.uuid == this.m_rootPart.uuid)
|
||||
{
|
||||
this.UpdateRootRotation(rot);
|
||||
}
|
||||
else
|
||||
{
|
||||
part.UpdateRotation(rot);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void UpdateRootRotation(LLQuaternion rot)
|
||||
{
|
||||
this.m_rootPart.UpdateRotation(rot);
|
||||
Axiom.Math.Quaternion axRot = new Quaternion(rot.W, rot.X, rot.Y, rot.Z);
|
||||
Axiom.Math.Quaternion oldParentRot = new Quaternion(this.m_rootPart.RotationOffset.W, this.m_rootPart.RotationOffset.X, this.m_rootPart.RotationOffset.Y, this.m_rootPart.RotationOffset.Z);
|
||||
|
||||
foreach (AllNewSceneObjectPart2 prim in this.m_parts.Values)
|
||||
{
|
||||
if (prim.uuid != this.m_rootPart.uuid)
|
||||
{
|
||||
Vector3 axPos = new Vector3(prim.OffsetPosition.X, prim.OffsetPosition.Y, prim.OffsetPosition.Z);
|
||||
axPos = oldParentRot * axPos;
|
||||
axPos = axRot.Inverse() * axPos;
|
||||
prim.OffsetPosition = new LLVector3(axPos.x, axPos.y, axPos.z);
|
||||
Axiom.Math.Quaternion primsRot = new Quaternion(prim.RotationOffset.W, prim.RotationOffset.X, prim.RotationOffset.Y, prim.RotationOffset.Z);
|
||||
Axiom.Math.Quaternion newRot = oldParentRot * primsRot;
|
||||
newRot = axRot.Inverse() * newRot;
|
||||
prim.RotationOffset = new LLQuaternion(newRot.w, newRot.x, newRot.y, newRot.z);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="part"></param>
|
||||
private void SetPartAsRoot(AllNewSceneObjectPart2 part)
|
||||
{
|
||||
this.m_rootPart = part;
|
||||
this.m_uuid = part.uuid;
|
||||
this.m_localId = part.m_localID;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="part"></param>
|
||||
private void SetPartAsNonRoot(AllNewSceneObjectPart2 part)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,216 +1,216 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System;
|
||||
using Axiom.Math;
|
||||
using libsecondlife;
|
||||
using libsecondlife.Packets;
|
||||
using OpenSim.Framework.Interfaces;
|
||||
using OpenSim.Framework.Types;
|
||||
|
||||
namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
|
||||
public class AllNewSceneObjectPart2
|
||||
{
|
||||
private const uint FULL_MASK_PERMISSIONS = 2147483647;
|
||||
|
||||
private uint m_flags = 32 + 65536 + 131072 + 256 + 4 + 8 + 2048 + 524288 + 268435456 + 128;
|
||||
private ulong m_regionHandle;
|
||||
|
||||
public string SitName = "";
|
||||
public string TouchName = "";
|
||||
public string Text = "";
|
||||
|
||||
public LLUUID CreatorID;
|
||||
public LLUUID OwnerID;
|
||||
public LLUUID LastOwnerID;
|
||||
public Int32 CreationDate;
|
||||
|
||||
public LLUUID uuid;
|
||||
public uint m_localID;
|
||||
|
||||
public uint ParentID = 0;
|
||||
|
||||
public uint OwnerMask = FULL_MASK_PERMISSIONS;
|
||||
public uint NextOwnerMask = FULL_MASK_PERMISSIONS;
|
||||
public uint GroupMask = FULL_MASK_PERMISSIONS;
|
||||
public uint EveryoneMask = FULL_MASK_PERMISSIONS;
|
||||
public uint BaseMask = FULL_MASK_PERMISSIONS;
|
||||
|
||||
protected PrimitiveBaseShape m_Shape;
|
||||
|
||||
protected AllNewSceneObjectGroup2 m_parentGroup;
|
||||
|
||||
|
||||
#region Properties
|
||||
protected string m_name;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public virtual string Name
|
||||
{
|
||||
get { return m_name; }
|
||||
set { m_name = value; }
|
||||
}
|
||||
|
||||
protected LLVector3 m_offset;
|
||||
public LLVector3 OffsetPosition
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_offset;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_offset = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected LLQuaternion m_rotationOffset;
|
||||
public LLQuaternion RotationOffset
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_rotationOffset;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_rotationOffset = value;
|
||||
}
|
||||
}
|
||||
|
||||
private string m_description = "";
|
||||
public string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_description;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_description = value;
|
||||
}
|
||||
}
|
||||
|
||||
public PrimitiveBaseShape Shape
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_Shape;
|
||||
}
|
||||
}
|
||||
|
||||
public LLVector3 Scale
|
||||
{
|
||||
set
|
||||
{
|
||||
this.m_Shape.Scale = value;
|
||||
}
|
||||
get
|
||||
{
|
||||
return this.m_Shape.Scale;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
public AllNewSceneObjectPart2(ulong regionHandle, AllNewSceneObjectGroup2 parent, LLUUID ownerID, uint localID, PrimitiveBaseShape shape, LLVector3 position)
|
||||
{
|
||||
this.m_regionHandle = regionHandle;
|
||||
this.m_parentGroup = parent;
|
||||
|
||||
this.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
|
||||
this.OwnerID = ownerID;
|
||||
this.CreatorID = this.OwnerID;
|
||||
this.LastOwnerID = LLUUID.Zero;
|
||||
this.uuid = LLUUID.Random();
|
||||
this.m_localID = (uint)(localID);
|
||||
this.m_Shape = shape;
|
||||
|
||||
this.OffsetPosition = position;
|
||||
|
||||
//temporary code just so the m_flags field doesn't give a compiler warning
|
||||
if (m_flags == 1)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Shape
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="shapeBlock"></param>
|
||||
public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock)
|
||||
{
|
||||
this.m_Shape.PathBegin = shapeBlock.PathBegin;
|
||||
this.m_Shape.PathEnd = shapeBlock.PathEnd;
|
||||
this.m_Shape.PathScaleX = shapeBlock.PathScaleX;
|
||||
this.m_Shape.PathScaleY = shapeBlock.PathScaleY;
|
||||
this.m_Shape.PathShearX = shapeBlock.PathShearX;
|
||||
this.m_Shape.PathShearY = shapeBlock.PathShearY;
|
||||
this.m_Shape.PathSkew = shapeBlock.PathSkew;
|
||||
this.m_Shape.ProfileBegin = shapeBlock.ProfileBegin;
|
||||
this.m_Shape.ProfileEnd = shapeBlock.ProfileEnd;
|
||||
this.m_Shape.PathCurve = shapeBlock.PathCurve;
|
||||
this.m_Shape.ProfileCurve = shapeBlock.ProfileCurve;
|
||||
this.m_Shape.ProfileHollow = shapeBlock.ProfileHollow;
|
||||
this.m_Shape.PathRadiusOffset = shapeBlock.PathRadiusOffset;
|
||||
this.m_Shape.PathRevolutions = shapeBlock.PathRevolutions;
|
||||
this.m_Shape.PathTaperX = shapeBlock.PathTaperX;
|
||||
this.m_Shape.PathTaperY = shapeBlock.PathTaperY;
|
||||
this.m_Shape.PathTwist = shapeBlock.PathTwist;
|
||||
this.m_Shape.PathTwistBegin = shapeBlock.PathTwistBegin;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Texture
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="textureEntry"></param>
|
||||
public void UpdateTextureEntry(byte[] textureEntry)
|
||||
{
|
||||
this.m_Shape.TextureEntry = textureEntry;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Position
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="pos"></param>
|
||||
public void UpdateOffSet(LLVector3 pos)
|
||||
{
|
||||
LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
|
||||
this.OffsetPosition = newPos;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region rotation
|
||||
public void UpdateRotation(LLQuaternion rot)
|
||||
{
|
||||
this.RotationOffset = new LLQuaternion(rot.X, rot.Y, rot.Z, rot.W);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Resizing/Scale
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="scale"></param>
|
||||
public void Resize(LLVector3 scale)
|
||||
{
|
||||
LLVector3 offset = (scale - this.m_Shape.Scale);
|
||||
offset.X /= 2;
|
||||
offset.Y /= 2;
|
||||
offset.Z /= 2;
|
||||
|
||||
this.OffsetPosition += offset;
|
||||
this.m_Shape.Scale = scale;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System;
|
||||
using Axiom.Math;
|
||||
using libsecondlife;
|
||||
using libsecondlife.Packets;
|
||||
using OpenSim.Framework.Interfaces;
|
||||
using OpenSim.Framework.Types;
|
||||
|
||||
namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
|
||||
public class AllNewSceneObjectPart2
|
||||
{
|
||||
private const uint FULL_MASK_PERMISSIONS = 2147483647;
|
||||
|
||||
private uint m_flags = 32 + 65536 + 131072 + 256 + 4 + 8 + 2048 + 524288 + 268435456 + 128;
|
||||
private ulong m_regionHandle;
|
||||
|
||||
public string SitName = "";
|
||||
public string TouchName = "";
|
||||
public string Text = "";
|
||||
|
||||
public LLUUID CreatorID;
|
||||
public LLUUID OwnerID;
|
||||
public LLUUID LastOwnerID;
|
||||
public Int32 CreationDate;
|
||||
|
||||
public LLUUID uuid;
|
||||
public uint m_localID;
|
||||
|
||||
public uint ParentID = 0;
|
||||
|
||||
public uint OwnerMask = FULL_MASK_PERMISSIONS;
|
||||
public uint NextOwnerMask = FULL_MASK_PERMISSIONS;
|
||||
public uint GroupMask = FULL_MASK_PERMISSIONS;
|
||||
public uint EveryoneMask = FULL_MASK_PERMISSIONS;
|
||||
public uint BaseMask = FULL_MASK_PERMISSIONS;
|
||||
|
||||
protected PrimitiveBaseShape m_Shape;
|
||||
|
||||
protected AllNewSceneObjectGroup2 m_parentGroup;
|
||||
|
||||
|
||||
#region Properties
|
||||
protected string m_name;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public virtual string Name
|
||||
{
|
||||
get { return m_name; }
|
||||
set { m_name = value; }
|
||||
}
|
||||
|
||||
protected LLVector3 m_offset;
|
||||
public LLVector3 OffsetPosition
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_offset;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_offset = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected LLQuaternion m_rotationOffset;
|
||||
public LLQuaternion RotationOffset
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_rotationOffset;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_rotationOffset = value;
|
||||
}
|
||||
}
|
||||
|
||||
private string m_description = "";
|
||||
public string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_description;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_description = value;
|
||||
}
|
||||
}
|
||||
|
||||
public PrimitiveBaseShape Shape
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_Shape;
|
||||
}
|
||||
}
|
||||
|
||||
public LLVector3 Scale
|
||||
{
|
||||
set
|
||||
{
|
||||
this.m_Shape.Scale = value;
|
||||
}
|
||||
get
|
||||
{
|
||||
return this.m_Shape.Scale;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
public AllNewSceneObjectPart2(ulong regionHandle, AllNewSceneObjectGroup2 parent, LLUUID ownerID, uint localID, PrimitiveBaseShape shape, LLVector3 position)
|
||||
{
|
||||
this.m_regionHandle = regionHandle;
|
||||
this.m_parentGroup = parent;
|
||||
|
||||
this.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
|
||||
this.OwnerID = ownerID;
|
||||
this.CreatorID = this.OwnerID;
|
||||
this.LastOwnerID = LLUUID.Zero;
|
||||
this.uuid = LLUUID.Random();
|
||||
this.m_localID = (uint)(localID);
|
||||
this.m_Shape = shape;
|
||||
|
||||
this.OffsetPosition = position;
|
||||
|
||||
//temporary code just so the m_flags field doesn't give a compiler warning
|
||||
if (m_flags == 1)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Shape
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="shapeBlock"></param>
|
||||
public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock)
|
||||
{
|
||||
this.m_Shape.PathBegin = shapeBlock.PathBegin;
|
||||
this.m_Shape.PathEnd = shapeBlock.PathEnd;
|
||||
this.m_Shape.PathScaleX = shapeBlock.PathScaleX;
|
||||
this.m_Shape.PathScaleY = shapeBlock.PathScaleY;
|
||||
this.m_Shape.PathShearX = shapeBlock.PathShearX;
|
||||
this.m_Shape.PathShearY = shapeBlock.PathShearY;
|
||||
this.m_Shape.PathSkew = shapeBlock.PathSkew;
|
||||
this.m_Shape.ProfileBegin = shapeBlock.ProfileBegin;
|
||||
this.m_Shape.ProfileEnd = shapeBlock.ProfileEnd;
|
||||
this.m_Shape.PathCurve = shapeBlock.PathCurve;
|
||||
this.m_Shape.ProfileCurve = shapeBlock.ProfileCurve;
|
||||
this.m_Shape.ProfileHollow = shapeBlock.ProfileHollow;
|
||||
this.m_Shape.PathRadiusOffset = shapeBlock.PathRadiusOffset;
|
||||
this.m_Shape.PathRevolutions = shapeBlock.PathRevolutions;
|
||||
this.m_Shape.PathTaperX = shapeBlock.PathTaperX;
|
||||
this.m_Shape.PathTaperY = shapeBlock.PathTaperY;
|
||||
this.m_Shape.PathTwist = shapeBlock.PathTwist;
|
||||
this.m_Shape.PathTwistBegin = shapeBlock.PathTwistBegin;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Texture
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="textureEntry"></param>
|
||||
public void UpdateTextureEntry(byte[] textureEntry)
|
||||
{
|
||||
this.m_Shape.TextureEntry = textureEntry;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Position
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="pos"></param>
|
||||
public void UpdateOffSet(LLVector3 pos)
|
||||
{
|
||||
LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
|
||||
this.OffsetPosition = newPos;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region rotation
|
||||
public void UpdateRotation(LLQuaternion rot)
|
||||
{
|
||||
this.RotationOffset = new LLQuaternion(rot.X, rot.Y, rot.Z, rot.W);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Resizing/Scale
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="scale"></param>
|
||||
public void Resize(LLVector3 scale)
|
||||
{
|
||||
LLVector3 offset = (scale - this.m_Shape.Scale);
|
||||
offset.X /= 2;
|
||||
offset.Y /= 2;
|
||||
offset.Z /= 2;
|
||||
|
||||
this.OffsetPosition += offset;
|
||||
this.m_Shape.Scale = scale;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,84 +1,84 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSim Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
/* Original code: Tedd Hansen */
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenSim.Region.Scripting.LSL
|
||||
{
|
||||
public static class Common
|
||||
{
|
||||
static public bool Debug = true;
|
||||
static public bool IL_UseTryCatch = true;
|
||||
static public bool IL_CreateConstructor = true;
|
||||
static public bool IL_CreateFunctionList = true;
|
||||
static public bool IL_ProcessCodeChunks = true;
|
||||
|
||||
public delegate void SendToDebugEventDelegate(string Message);
|
||||
public delegate void SendToLogEventDelegate(string Message);
|
||||
static public event SendToDebugEventDelegate SendToDebugEvent;
|
||||
static public event SendToLogEventDelegate SendToLogEvent;
|
||||
|
||||
static public void SendToDebug(string Message)
|
||||
{
|
||||
//if (Debug == true)
|
||||
Console.WriteLine("Debug: " + Message);
|
||||
SendToDebugEvent(DateTime.Now.ToString("[HH:mm:ss] ") + Message + "\r\n");
|
||||
}
|
||||
static public void SendToLog(string Message)
|
||||
{
|
||||
//if (Debug == true)
|
||||
Console.WriteLine("LOG: " + Message);
|
||||
SendToLogEvent(DateTime.Now.ToString("[HH:mm:ss] ") + Message + "\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
// TEMPORARY TEST THINGIES
|
||||
public static class IL_Helper
|
||||
{
|
||||
public static string ReverseFormatString(string text1, string format)
|
||||
{
|
||||
Common.SendToDebug("ReverseFormatString text1: " + text1);
|
||||
Common.SendToDebug("ReverseFormatString format: " + format);
|
||||
return string.Format(format, text1);
|
||||
}
|
||||
public static string ReverseFormatString(string text1, UInt32 text2, string format)
|
||||
{
|
||||
Common.SendToDebug("ReverseFormatString text1: " + text1);
|
||||
Common.SendToDebug("ReverseFormatString text2: " + text2.ToString());
|
||||
Common.SendToDebug("ReverseFormatString format: " + format);
|
||||
return string.Format(format, text1, text2.ToString());
|
||||
}
|
||||
public static string Cast_ToString(object obj)
|
||||
{
|
||||
Common.SendToDebug("OBJECT TO BE CASTED: " + obj.GetType().ToString());
|
||||
return "ABCDEFGIHJKLMNOPQ123";
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSim Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
/* Original code: Tedd Hansen */
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenSim.Region.Scripting.LSL
|
||||
{
|
||||
public static class Common
|
||||
{
|
||||
static public bool Debug = true;
|
||||
static public bool IL_UseTryCatch = true;
|
||||
static public bool IL_CreateConstructor = true;
|
||||
static public bool IL_CreateFunctionList = true;
|
||||
static public bool IL_ProcessCodeChunks = true;
|
||||
|
||||
public delegate void SendToDebugEventDelegate(string Message);
|
||||
public delegate void SendToLogEventDelegate(string Message);
|
||||
static public event SendToDebugEventDelegate SendToDebugEvent;
|
||||
static public event SendToLogEventDelegate SendToLogEvent;
|
||||
|
||||
static public void SendToDebug(string Message)
|
||||
{
|
||||
//if (Debug == true)
|
||||
Console.WriteLine("Debug: " + Message);
|
||||
SendToDebugEvent(DateTime.Now.ToString("[HH:mm:ss] ") + Message + "\r\n");
|
||||
}
|
||||
static public void SendToLog(string Message)
|
||||
{
|
||||
//if (Debug == true)
|
||||
Console.WriteLine("LOG: " + Message);
|
||||
SendToLogEvent(DateTime.Now.ToString("[HH:mm:ss] ") + Message + "\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
// TEMPORARY TEST THINGIES
|
||||
public static class IL_Helper
|
||||
{
|
||||
public static string ReverseFormatString(string text1, string format)
|
||||
{
|
||||
Common.SendToDebug("ReverseFormatString text1: " + text1);
|
||||
Common.SendToDebug("ReverseFormatString format: " + format);
|
||||
return string.Format(format, text1);
|
||||
}
|
||||
public static string ReverseFormatString(string text1, UInt32 text2, string format)
|
||||
{
|
||||
Common.SendToDebug("ReverseFormatString text1: " + text1);
|
||||
Common.SendToDebug("ReverseFormatString text2: " + text2.ToString());
|
||||
Common.SendToDebug("ReverseFormatString format: " + format);
|
||||
return string.Format(format, text1, text2.ToString());
|
||||
}
|
||||
public static string Cast_ToString(object obj)
|
||||
{
|
||||
Common.SendToDebug("OBJECT TO BE CASTED: " + obj.GetType().ToString());
|
||||
return "ABCDEFGIHJKLMNOPQ123";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,56 +1,56 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSim Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
/* Original code: Tedd Hansen */
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
|
||||
namespace OpenSim.Region.Scripting.LSL
|
||||
{
|
||||
partial class LSO_Parser
|
||||
{
|
||||
private static TypeBuilder CreateType(ModuleBuilder modBuilder, string typeName)
|
||||
{
|
||||
TypeBuilder typeBuilder = modBuilder.DefineType(typeName,
|
||||
TypeAttributes.Public |
|
||||
TypeAttributes.Class |
|
||||
TypeAttributes.AutoClass |
|
||||
TypeAttributes.AnsiClass |
|
||||
TypeAttributes.BeforeFieldInit |
|
||||
TypeAttributes.AutoLayout,
|
||||
typeof(object),
|
||||
new Type[] { typeof(object) });
|
||||
return typeBuilder;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSim Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
/* Original code: Tedd Hansen */
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
|
||||
namespace OpenSim.Region.Scripting.LSL
|
||||
{
|
||||
partial class LSO_Parser
|
||||
{
|
||||
private static TypeBuilder CreateType(ModuleBuilder modBuilder, string typeName)
|
||||
{
|
||||
TypeBuilder typeBuilder = modBuilder.DefineType(typeName,
|
||||
TypeAttributes.Public |
|
||||
TypeAttributes.Class |
|
||||
TypeAttributes.AutoClass |
|
||||
TypeAttributes.AnsiClass |
|
||||
TypeAttributes.BeforeFieldInit |
|
||||
TypeAttributes.AutoLayout,
|
||||
typeof(object),
|
||||
new Type[] { typeof(object) });
|
||||
return typeBuilder;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,366 +1,366 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSim Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
/* Original code: Tedd Hansen */
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenSim.Region.Scripting.LSL
|
||||
{
|
||||
public interface LSL_BuiltIn_Commands_Interface
|
||||
{
|
||||
void llSin();
|
||||
void llCos();
|
||||
void llTan();
|
||||
void llAtan2();
|
||||
void llSqrt();
|
||||
void llPow();
|
||||
void llAbs();
|
||||
void llFabs();
|
||||
void llFrand();
|
||||
void llFloor();
|
||||
void llCeil();
|
||||
void llRound();
|
||||
void llVecMag();
|
||||
void llVecNorm();
|
||||
void llVecDist();
|
||||
void llRot2Euler();
|
||||
void llEuler2Rot();
|
||||
void llAxes2Rot();
|
||||
void llRot2Fwd();
|
||||
void llRot2Left();
|
||||
void llRot2Up();
|
||||
void llRotBetween();
|
||||
void llWhisper();
|
||||
void llSay(UInt32 channelID, string text);
|
||||
void llShout();
|
||||
void llListen();
|
||||
void llListenControl();
|
||||
void llListenRemove();
|
||||
void llSensor();
|
||||
void llSensorRepeat();
|
||||
void llSensorRemove();
|
||||
void llDetectedName();
|
||||
void llDetectedKey();
|
||||
void llDetectedOwner();
|
||||
void llDetectedType();
|
||||
void llDetectedPos();
|
||||
void llDetectedVel();
|
||||
void llDetectedGrab();
|
||||
void llDetectedRot();
|
||||
void llDetectedGroup();
|
||||
void llDetectedLinkNumber();
|
||||
void llDie();
|
||||
void llGround();
|
||||
void llCloud();
|
||||
void llWind();
|
||||
void llSetStatus();
|
||||
void llGetStatus();
|
||||
void llSetScale();
|
||||
void llGetScale();
|
||||
void llSetColor();
|
||||
void llGetAlpha();
|
||||
void llSetAlpha();
|
||||
void llGetColor();
|
||||
void llSetTexture();
|
||||
void llScaleTexture();
|
||||
void llOffsetTexture();
|
||||
void llRotateTexture();
|
||||
void llGetTexture();
|
||||
void llSetPos();
|
||||
void llGetPos();
|
||||
void llGetLocalPos();
|
||||
void llSetRot();
|
||||
void llGetRot();
|
||||
void llGetLocalRot();
|
||||
void llSetForce();
|
||||
void llGetForce();
|
||||
void llTarget();
|
||||
void llTargetRemove();
|
||||
void llRotTarget();
|
||||
void llRotTargetRemove();
|
||||
void llMoveToTarget();
|
||||
void llStopMoveToTarget();
|
||||
void llApplyImpulse();
|
||||
void llApplyRotationalImpulse();
|
||||
void llSetTorque();
|
||||
void llGetTorque();
|
||||
void llSetForceAndTorque();
|
||||
void llGetVel();
|
||||
void llGetAccel();
|
||||
void llGetOmega();
|
||||
void llGetTimeOfDay();
|
||||
void llGetWallclock();
|
||||
void llGetTime();
|
||||
void llResetTime();
|
||||
void llGetAndResetTime();
|
||||
void llSound();
|
||||
void llPlaySound();
|
||||
void llLoopSound();
|
||||
void llLoopSoundMaster();
|
||||
void llLoopSoundSlave();
|
||||
void llPlaySoundSlave();
|
||||
void llTriggerSound();
|
||||
void llStopSound();
|
||||
void llPreloadSound();
|
||||
void llGetSubString();
|
||||
void llDeleteSubString();
|
||||
void llInsertString();
|
||||
void llToUpper();
|
||||
void llToLower();
|
||||
void llGiveMoney();
|
||||
void llMakeExplosion();
|
||||
void llMakeFountain();
|
||||
void llMakeSmoke();
|
||||
void llMakeFire();
|
||||
void llRezObject();
|
||||
void llLookAt();
|
||||
void llStopLookAt();
|
||||
void llSetTimerEvent();
|
||||
void llSleep();
|
||||
void llGetMass();
|
||||
void llCollisionFilter();
|
||||
void llTakeControls();
|
||||
void llReleaseControls();
|
||||
void llAttachToAvatar();
|
||||
void llDetachFromAvatar();
|
||||
void llTakeCamera();
|
||||
void llReleaseCamera();
|
||||
void llGetOwner();
|
||||
void llInstantMessage();
|
||||
void llEmail();
|
||||
void llGetNextEmail();
|
||||
void llGetKey();
|
||||
void llSetBuoyancy();
|
||||
void llSetHoverHeight();
|
||||
void llStopHover();
|
||||
void llMinEventDelay();
|
||||
void llSoundPreload();
|
||||
void llRotLookAt();
|
||||
void llStringLength();
|
||||
void llStartAnimation();
|
||||
void llStopAnimation();
|
||||
void llPointAt();
|
||||
void llStopPointAt();
|
||||
void llTargetOmega();
|
||||
void llGetStartParameter();
|
||||
void llGodLikeRezObject();
|
||||
void llRequestPermissions();
|
||||
void llGetPermissionsKey();
|
||||
void llGetPermissions();
|
||||
void llGetLinkNumber();
|
||||
void llSetLinkColor();
|
||||
void llCreateLink();
|
||||
void llBreakLink();
|
||||
void llBreakAllLinks();
|
||||
void llGetLinkKey();
|
||||
void llGetLinkName();
|
||||
void llGetInventoryNumber();
|
||||
void llGetInventoryName();
|
||||
void llSetScriptState();
|
||||
void llGetEnergy();
|
||||
void llGiveInventory();
|
||||
void llRemoveInventory();
|
||||
void llSetText();
|
||||
void llWater();
|
||||
void llPassTouches();
|
||||
void llRequestAgentData();
|
||||
void llRequestInventoryData();
|
||||
void llSetDamage();
|
||||
void llTeleportAgentHome();
|
||||
void llModifyLand();
|
||||
void llCollisionSound();
|
||||
void llCollisionSprite();
|
||||
void llGetAnimation();
|
||||
void llResetScript();
|
||||
void llMessageLinked();
|
||||
void llPushObject();
|
||||
void llPassCollisions();
|
||||
void llGetScriptName();
|
||||
void llGetNumberOfSides();
|
||||
void llAxisAngle2Rot();
|
||||
void llRot2Axis();
|
||||
void llRot2Angle();
|
||||
void llAcos();
|
||||
void llAsin();
|
||||
void llAngleBetween();
|
||||
void llGetInventoryKey();
|
||||
void llAllowInventoryDrop();
|
||||
void llGetSunDirection();
|
||||
void llGetTextureOffset();
|
||||
void llGetTextureScale();
|
||||
void llGetTextureRot();
|
||||
void llSubStringIndex();
|
||||
void llGetOwnerKey();
|
||||
void llGetCenterOfMass();
|
||||
void llListSort();
|
||||
void llGetListLength();
|
||||
void llList2Integer();
|
||||
void llList2Float();
|
||||
void llList2String();
|
||||
void llList2Key();
|
||||
void llList2Vector();
|
||||
void llList2Rot();
|
||||
void llList2List();
|
||||
void llDeleteSubList();
|
||||
void llGetListEntryType();
|
||||
void llList2CSV();
|
||||
void llCSV2List();
|
||||
void llListRandomize();
|
||||
void llList2ListStrided();
|
||||
void llGetRegionCorner();
|
||||
void llListInsertList();
|
||||
void llListFindList();
|
||||
void llGetObjectName();
|
||||
void llSetObjectName();
|
||||
void llGetDate();
|
||||
void llEdgeOfWorld();
|
||||
void llGetAgentInfo();
|
||||
void llAdjustSoundVolume();
|
||||
void llSetSoundQueueing();
|
||||
void llSetSoundRadius();
|
||||
void llKey2Name();
|
||||
void llSetTextureAnim();
|
||||
void llTriggerSoundLimited();
|
||||
void llEjectFromLand();
|
||||
void llParseString2List();
|
||||
void llOverMyLand();
|
||||
void llGetLandOwnerAt();
|
||||
void llGetNotecardLine();
|
||||
void llGetAgentSize();
|
||||
void llSameGroup();
|
||||
void llUnSit();
|
||||
void llGroundSlope();
|
||||
void llGroundNormal();
|
||||
void llGroundContour();
|
||||
void llGetAttached();
|
||||
void llGetFreeMemory();
|
||||
void llGetRegionName();
|
||||
void llGetRegionTimeDilation();
|
||||
void llGetRegionFPS();
|
||||
void llParticleSystem();
|
||||
void llGroundRepel();
|
||||
void llGiveInventoryList();
|
||||
void llSetVehicleType();
|
||||
void llSetVehicleFloatParam();
|
||||
void llSetVehicleVectorParam();
|
||||
void llSetVehicleRotationParam();
|
||||
void llSetVehicleFlags();
|
||||
void llRemoveVehicleFlags();
|
||||
void llSitTarget();
|
||||
void llAvatarOnSitTarget();
|
||||
void llAddToLandPassList();
|
||||
void llSetTouchText();
|
||||
void llSetSitText();
|
||||
void llSetCameraEyeOffset();
|
||||
void llSetCameraAtOffset();
|
||||
void llDumpList2String();
|
||||
void llScriptDanger();
|
||||
void llDialog();
|
||||
void llVolumeDetect();
|
||||
void llResetOtherScript();
|
||||
void llGetScriptState();
|
||||
void llRemoteLoadScript();
|
||||
void llSetRemoteScriptAccessPin();
|
||||
void llRemoteLoadScriptPin();
|
||||
void llOpenRemoteDataChannel();
|
||||
void llSendRemoteData();
|
||||
void llRemoteDataReply();
|
||||
void llCloseRemoteDataChannel();
|
||||
void llMD5String();
|
||||
void llSetPrimitiveParams();
|
||||
void llStringToBase64();
|
||||
void llBase64ToString();
|
||||
void llXorBase64Strings();
|
||||
void llRemoteDataSetRegion();
|
||||
void llLog10();
|
||||
void llLog();
|
||||
void llGetAnimationList();
|
||||
void llSetParcelMusicURL();
|
||||
void llGetRootPosition();
|
||||
void llGetRootRotation();
|
||||
void llGetObjectDesc();
|
||||
void llSetObjectDesc();
|
||||
void llGetCreator();
|
||||
void llGetTimestamp();
|
||||
void llSetLinkAlpha();
|
||||
void llGetNumberOfPrims();
|
||||
void llGetNumberOfNotecardLines();
|
||||
void llGetBoundingBox();
|
||||
void llGetGeometricCenter();
|
||||
void llGetPrimitiveParams();
|
||||
void llIntegerToBase64();
|
||||
void llBase64ToInteger();
|
||||
void llGetGMTclock();
|
||||
void llGetSimulatorHostname();
|
||||
void llSetLocalRot();
|
||||
void llParseStringKeepNulls();
|
||||
void llRezAtRoot();
|
||||
void llGetObjectPermMask();
|
||||
void llSetObjectPermMask();
|
||||
void llGetInventoryPermMask();
|
||||
void llSetInventoryPermMask();
|
||||
void llGetInventoryCreator();
|
||||
void llOwnerSay();
|
||||
void llRequestSimulatorData();
|
||||
void llForceMouselook();
|
||||
void llGetObjectMass();
|
||||
void llListReplaceList();
|
||||
void llLoadURL();
|
||||
void llParcelMediaCommandList();
|
||||
void llParcelMediaQuery();
|
||||
void llModPow();
|
||||
void llGetInventoryType();
|
||||
void llSetPayPrice();
|
||||
void llGetCameraPos();
|
||||
void llGetCameraRot();
|
||||
void llSetPrimURL();
|
||||
void llRefreshPrimURL();
|
||||
void llEscapeURL();
|
||||
void llUnescapeURL();
|
||||
void llMapDestination();
|
||||
void llAddToLandBanList();
|
||||
void llRemoveFromLandPassList();
|
||||
void llRemoveFromLandBanList();
|
||||
void llSetCameraParams();
|
||||
void llClearCameraParams();
|
||||
void llListStatistics();
|
||||
void llGetUnixTime();
|
||||
void llGetParcelFlags();
|
||||
void llGetRegionFlags();
|
||||
void llXorBase64StringsCorrect();
|
||||
void llHTTPRequest();
|
||||
void llResetLandBanList();
|
||||
void llResetLandPassList();
|
||||
void llGetParcelPrimCount();
|
||||
void llGetParcelPrimOwners();
|
||||
void llGetObjectPrimCount();
|
||||
void llGetParcelMaxPrims();
|
||||
void llGetParcelDetails();
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSim Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
/* Original code: Tedd Hansen */
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenSim.Region.Scripting.LSL
|
||||
{
|
||||
public interface LSL_BuiltIn_Commands_Interface
|
||||
{
|
||||
void llSin();
|
||||
void llCos();
|
||||
void llTan();
|
||||
void llAtan2();
|
||||
void llSqrt();
|
||||
void llPow();
|
||||
void llAbs();
|
||||
void llFabs();
|
||||
void llFrand();
|
||||
void llFloor();
|
||||
void llCeil();
|
||||
void llRound();
|
||||
void llVecMag();
|
||||
void llVecNorm();
|
||||
void llVecDist();
|
||||
void llRot2Euler();
|
||||
void llEuler2Rot();
|
||||
void llAxes2Rot();
|
||||
void llRot2Fwd();
|
||||
void llRot2Left();
|
||||
void llRot2Up();
|
||||
void llRotBetween();
|
||||
void llWhisper();
|
||||
void llSay(UInt32 channelID, string text);
|
||||
void llShout();
|
||||
void llListen();
|
||||
void llListenControl();
|
||||
void llListenRemove();
|
||||
void llSensor();
|
||||
void llSensorRepeat();
|
||||
void llSensorRemove();
|
||||
void llDetectedName();
|
||||
void llDetectedKey();
|
||||
void llDetectedOwner();
|
||||
void llDetectedType();
|
||||
void llDetectedPos();
|
||||
void llDetectedVel();
|
||||
void llDetectedGrab();
|
||||
void llDetectedRot();
|
||||
void llDetectedGroup();
|
||||
void llDetectedLinkNumber();
|
||||
void llDie();
|
||||
void llGround();
|
||||
void llCloud();
|
||||
void llWind();
|
||||
void llSetStatus();
|
||||
void llGetStatus();
|
||||
void llSetScale();
|
||||
void llGetScale();
|
||||
void llSetColor();
|
||||
void llGetAlpha();
|
||||
void llSetAlpha();
|
||||
void llGetColor();
|
||||
void llSetTexture();
|
||||
void llScaleTexture();
|
||||
void llOffsetTexture();
|
||||
void llRotateTexture();
|
||||
void llGetTexture();
|
||||
void llSetPos();
|
||||
void llGetPos();
|
||||
void llGetLocalPos();
|
||||
void llSetRot();
|
||||
void llGetRot();
|
||||
void llGetLocalRot();
|
||||
void llSetForce();
|
||||
void llGetForce();
|
||||
void llTarget();
|
||||
void llTargetRemove();
|
||||
void llRotTarget();
|
||||
void llRotTargetRemove();
|
||||
void llMoveToTarget();
|
||||
void llStopMoveToTarget();
|
||||
void llApplyImpulse();
|
||||
void llApplyRotationalImpulse();
|
||||
void llSetTorque();
|
||||
void llGetTorque();
|
||||
void llSetForceAndTorque();
|
||||
void llGetVel();
|
||||
void llGetAccel();
|
||||
void llGetOmega();
|
||||
void llGetTimeOfDay();
|
||||
void llGetWallclock();
|
||||
void llGetTime();
|
||||
void llResetTime();
|
||||
void llGetAndResetTime();
|
||||
void llSound();
|
||||
void llPlaySound();
|
||||
void llLoopSound();
|
||||
void llLoopSoundMaster();
|
||||
void llLoopSoundSlave();
|
||||
void llPlaySoundSlave();
|
||||
void llTriggerSound();
|
||||
void llStopSound();
|
||||
void llPreloadSound();
|
||||
void llGetSubString();
|
||||
void llDeleteSubString();
|
||||
void llInsertString();
|
||||
void llToUpper();
|
||||
void llToLower();
|
||||
void llGiveMoney();
|
||||
void llMakeExplosion();
|
||||
void llMakeFountain();
|
||||
void llMakeSmoke();
|
||||
void llMakeFire();
|
||||
void llRezObject();
|
||||
void llLookAt();
|
||||
void llStopLookAt();
|
||||
void llSetTimerEvent();
|
||||
void llSleep();
|
||||
void llGetMass();
|
||||
void llCollisionFilter();
|
||||
void llTakeControls();
|
||||
void llReleaseControls();
|
||||
void llAttachToAvatar();
|
||||
void llDetachFromAvatar();
|
||||
void llTakeCamera();
|
||||
void llReleaseCamera();
|
||||
void llGetOwner();
|
||||
void llInstantMessage();
|
||||
void llEmail();
|
||||
void llGetNextEmail();
|
||||
void llGetKey();
|
||||
void llSetBuoyancy();
|
||||
void llSetHoverHeight();
|
||||
void llStopHover();
|
||||
void llMinEventDelay();
|
||||
void llSoundPreload();
|
||||
void llRotLookAt();
|
||||
void llStringLength();
|
||||
void llStartAnimation();
|
||||
void llStopAnimation();
|
||||
void llPointAt();
|
||||
void llStopPointAt();
|
||||
void llTargetOmega();
|
||||
void llGetStartParameter();
|
||||
void llGodLikeRezObject();
|
||||
void llRequestPermissions();
|
||||
void llGetPermissionsKey();
|
||||
void llGetPermissions();
|
||||
void llGetLinkNumber();
|
||||
void llSetLinkColor();
|
||||
void llCreateLink();
|
||||
void llBreakLink();
|
||||
void llBreakAllLinks();
|
||||
void llGetLinkKey();
|
||||
void llGetLinkName();
|
||||
void llGetInventoryNumber();
|
||||
void llGetInventoryName();
|
||||
void llSetScriptState();
|
||||
void llGetEnergy();
|
||||
void llGiveInventory();
|
||||
void llRemoveInventory();
|
||||
void llSetText();
|
||||
void llWater();
|
||||
void llPassTouches();
|
||||
void llRequestAgentData();
|
||||
void llRequestInventoryData();
|
||||
void llSetDamage();
|
||||
void llTeleportAgentHome();
|
||||
void llModifyLand();
|
||||
void llCollisionSound();
|
||||
void llCollisionSprite();
|
||||
void llGetAnimation();
|
||||
void llResetScript();
|
||||
void llMessageLinked();
|
||||
void llPushObject();
|
||||
void llPassCollisions();
|
||||
void llGetScriptName();
|
||||
void llGetNumberOfSides();
|
||||
void llAxisAngle2Rot();
|
||||
void llRot2Axis();
|
||||
void llRot2Angle();
|
||||
void llAcos();
|
||||
void llAsin();
|
||||
void llAngleBetween();
|
||||
void llGetInventoryKey();
|
||||
void llAllowInventoryDrop();
|
||||
void llGetSunDirection();
|
||||
void llGetTextureOffset();
|
||||
void llGetTextureScale();
|
||||
void llGetTextureRot();
|
||||
void llSubStringIndex();
|
||||
void llGetOwnerKey();
|
||||
void llGetCenterOfMass();
|
||||
void llListSort();
|
||||
void llGetListLength();
|
||||
void llList2Integer();
|
||||
void llList2Float();
|
||||
void llList2String();
|
||||
void llList2Key();
|
||||
void llList2Vector();
|
||||
void llList2Rot();
|
||||
void llList2List();
|
||||
void llDeleteSubList();
|
||||
void llGetListEntryType();
|
||||
void llList2CSV();
|
||||
void llCSV2List();
|
||||
void llListRandomize();
|
||||
void llList2ListStrided();
|
||||
void llGetRegionCorner();
|
||||
void llListInsertList();
|
||||
void llListFindList();
|
||||
void llGetObjectName();
|
||||
void llSetObjectName();
|
||||
void llGetDate();
|
||||
void llEdgeOfWorld();
|
||||
void llGetAgentInfo();
|
||||
void llAdjustSoundVolume();
|
||||
void llSetSoundQueueing();
|
||||
void llSetSoundRadius();
|
||||
void llKey2Name();
|
||||
void llSetTextureAnim();
|
||||
void llTriggerSoundLimited();
|
||||
void llEjectFromLand();
|
||||
void llParseString2List();
|
||||
void llOverMyLand();
|
||||
void llGetLandOwnerAt();
|
||||
void llGetNotecardLine();
|
||||
void llGetAgentSize();
|
||||
void llSameGroup();
|
||||
void llUnSit();
|
||||
void llGroundSlope();
|
||||
void llGroundNormal();
|
||||
void llGroundContour();
|
||||
void llGetAttached();
|
||||
void llGetFreeMemory();
|
||||
void llGetRegionName();
|
||||
void llGetRegionTimeDilation();
|
||||
void llGetRegionFPS();
|
||||
void llParticleSystem();
|
||||
void llGroundRepel();
|
||||
void llGiveInventoryList();
|
||||
void llSetVehicleType();
|
||||
void llSetVehicleFloatParam();
|
||||
void llSetVehicleVectorParam();
|
||||
void llSetVehicleRotationParam();
|
||||
void llSetVehicleFlags();
|
||||
void llRemoveVehicleFlags();
|
||||
void llSitTarget();
|
||||
void llAvatarOnSitTarget();
|
||||
void llAddToLandPassList();
|
||||
void llSetTouchText();
|
||||
void llSetSitText();
|
||||
void llSetCameraEyeOffset();
|
||||
void llSetCameraAtOffset();
|
||||
void llDumpList2String();
|
||||
void llScriptDanger();
|
||||
void llDialog();
|
||||
void llVolumeDetect();
|
||||
void llResetOtherScript();
|
||||
void llGetScriptState();
|
||||
void llRemoteLoadScript();
|
||||
void llSetRemoteScriptAccessPin();
|
||||
void llRemoteLoadScriptPin();
|
||||
void llOpenRemoteDataChannel();
|
||||
void llSendRemoteData();
|
||||
void llRemoteDataReply();
|
||||
void llCloseRemoteDataChannel();
|
||||
void llMD5String();
|
||||
void llSetPrimitiveParams();
|
||||
void llStringToBase64();
|
||||
void llBase64ToString();
|
||||
void llXorBase64Strings();
|
||||
void llRemoteDataSetRegion();
|
||||
void llLog10();
|
||||
void llLog();
|
||||
void llGetAnimationList();
|
||||
void llSetParcelMusicURL();
|
||||
void llGetRootPosition();
|
||||
void llGetRootRotation();
|
||||
void llGetObjectDesc();
|
||||
void llSetObjectDesc();
|
||||
void llGetCreator();
|
||||
void llGetTimestamp();
|
||||
void llSetLinkAlpha();
|
||||
void llGetNumberOfPrims();
|
||||
void llGetNumberOfNotecardLines();
|
||||
void llGetBoundingBox();
|
||||
void llGetGeometricCenter();
|
||||
void llGetPrimitiveParams();
|
||||
void llIntegerToBase64();
|
||||
void llBase64ToInteger();
|
||||
void llGetGMTclock();
|
||||
void llGetSimulatorHostname();
|
||||
void llSetLocalRot();
|
||||
void llParseStringKeepNulls();
|
||||
void llRezAtRoot();
|
||||
void llGetObjectPermMask();
|
||||
void llSetObjectPermMask();
|
||||
void llGetInventoryPermMask();
|
||||
void llSetInventoryPermMask();
|
||||
void llGetInventoryCreator();
|
||||
void llOwnerSay();
|
||||
void llRequestSimulatorData();
|
||||
void llForceMouselook();
|
||||
void llGetObjectMass();
|
||||
void llListReplaceList();
|
||||
void llLoadURL();
|
||||
void llParcelMediaCommandList();
|
||||
void llParcelMediaQuery();
|
||||
void llModPow();
|
||||
void llGetInventoryType();
|
||||
void llSetPayPrice();
|
||||
void llGetCameraPos();
|
||||
void llGetCameraRot();
|
||||
void llSetPrimURL();
|
||||
void llRefreshPrimURL();
|
||||
void llEscapeURL();
|
||||
void llUnescapeURL();
|
||||
void llMapDestination();
|
||||
void llAddToLandBanList();
|
||||
void llRemoveFromLandPassList();
|
||||
void llRemoveFromLandBanList();
|
||||
void llSetCameraParams();
|
||||
void llClearCameraParams();
|
||||
void llListStatistics();
|
||||
void llGetUnixTime();
|
||||
void llGetParcelFlags();
|
||||
void llGetRegionFlags();
|
||||
void llXorBase64StringsCorrect();
|
||||
void llHTTPRequest();
|
||||
void llResetLandBanList();
|
||||
void llResetLandPassList();
|
||||
void llGetParcelPrimCount();
|
||||
void llGetParcelPrimOwners();
|
||||
void llGetObjectPrimCount();
|
||||
void llGetParcelMaxPrims();
|
||||
void llGetParcelDetails();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,377 +1,377 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSim Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
/* Original code: Tedd Hansen */
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenSim.Region.Scripting.LSL
|
||||
{
|
||||
public class LSL_BuiltIn_Commands_TestImplementation: LSL_BuiltIn_Commands_Interface
|
||||
{
|
||||
public LSL_BuiltIn_Commands_TestImplementation()
|
||||
{
|
||||
Common.SendToDebug("LSL_BuiltIn_Commands_TestImplementation: Creating object");
|
||||
}
|
||||
|
||||
public void llSin() { }
|
||||
public void llCos() { }
|
||||
public void llTan() { }
|
||||
public void llAtan2() { }
|
||||
public void llSqrt() { }
|
||||
public void llPow() { }
|
||||
public void llAbs() { }
|
||||
public void llFabs() { }
|
||||
public void llFrand() { }
|
||||
public void llFloor() { }
|
||||
public void llCeil() { }
|
||||
public void llRound() { }
|
||||
public void llVecMag() { }
|
||||
public void llVecNorm() { }
|
||||
public void llVecDist() { }
|
||||
public void llRot2Euler() { }
|
||||
public void llEuler2Rot() { }
|
||||
public void llAxes2Rot() { }
|
||||
public void llRot2Fwd() { }
|
||||
public void llRot2Left() { }
|
||||
public void llRot2Up() { }
|
||||
public void llRotBetween() { }
|
||||
public void llWhisper() { }
|
||||
public void llSay(UInt32 channelID, string text)
|
||||
{
|
||||
Common.SendToDebug("INTERNAL FUNCTION llSay(" + channelID + ", \"" + text + "\");");
|
||||
}
|
||||
public void llShout() { }
|
||||
public void llListen() { }
|
||||
public void llListenControl() { }
|
||||
public void llListenRemove() { }
|
||||
public void llSensor() { }
|
||||
public void llSensorRepeat() { }
|
||||
public void llSensorRemove() { }
|
||||
public void llDetectedName() { }
|
||||
public void llDetectedKey() { }
|
||||
public void llDetectedOwner() { }
|
||||
public void llDetectedType() { }
|
||||
public void llDetectedPos() { }
|
||||
public void llDetectedVel() { }
|
||||
public void llDetectedGrab() { }
|
||||
public void llDetectedRot() { }
|
||||
public void llDetectedGroup() { }
|
||||
public void llDetectedLinkNumber() { }
|
||||
public void llDie() { }
|
||||
public void llGround() { }
|
||||
public void llCloud() { }
|
||||
public void llWind() { }
|
||||
public void llSetStatus() { }
|
||||
public void llGetStatus() { }
|
||||
public void llSetScale() { }
|
||||
public void llGetScale() { }
|
||||
public void llSetColor() { }
|
||||
public void llGetAlpha() { }
|
||||
public void llSetAlpha() { }
|
||||
public void llGetColor() { }
|
||||
public void llSetTexture() { }
|
||||
public void llScaleTexture() { }
|
||||
public void llOffsetTexture() { }
|
||||
public void llRotateTexture() { }
|
||||
public void llGetTexture() { }
|
||||
public void llSetPos() { }
|
||||
public void llGetPos() { }
|
||||
public void llGetLocalPos() { }
|
||||
public void llSetRot() { }
|
||||
public void llGetRot() { }
|
||||
public void llGetLocalRot() { }
|
||||
public void llSetForce() { }
|
||||
public void llGetForce() { }
|
||||
public void llTarget() { }
|
||||
public void llTargetRemove() { }
|
||||
public void llRotTarget() { }
|
||||
public void llRotTargetRemove() { }
|
||||
public void llMoveToTarget() { }
|
||||
public void llStopMoveToTarget() { }
|
||||
public void llApplyImpulse() { }
|
||||
public void llApplyRotationalImpulse() { }
|
||||
public void llSetTorque() { }
|
||||
public void llGetTorque() { }
|
||||
public void llSetForceAndTorque() { }
|
||||
public void llGetVel() { }
|
||||
public void llGetAccel() { }
|
||||
public void llGetOmega() { }
|
||||
public void llGetTimeOfDay() { }
|
||||
public void llGetWallclock() { }
|
||||
public void llGetTime() { }
|
||||
public void llResetTime() { }
|
||||
public void llGetAndResetTime() { }
|
||||
public void llSound() { }
|
||||
public void llPlaySound() { }
|
||||
public void llLoopSound() { }
|
||||
public void llLoopSoundMaster() { }
|
||||
public void llLoopSoundSlave() { }
|
||||
public void llPlaySoundSlave() { }
|
||||
public void llTriggerSound() { }
|
||||
public void llStopSound() { }
|
||||
public void llPreloadSound() { }
|
||||
public void llGetSubString() { }
|
||||
public void llDeleteSubString() { }
|
||||
public void llInsertString() { }
|
||||
public void llToUpper() { }
|
||||
public void llToLower() { }
|
||||
public void llGiveMoney() { }
|
||||
public void llMakeExplosion() { }
|
||||
public void llMakeFountain() { }
|
||||
public void llMakeSmoke() { }
|
||||
public void llMakeFire() { }
|
||||
public void llRezObject() { }
|
||||
public void llLookAt() { }
|
||||
public void llStopLookAt() { }
|
||||
public void llSetTimerEvent() { }
|
||||
public void llSleep() { }
|
||||
public void llGetMass() { }
|
||||
public void llCollisionFilter() { }
|
||||
public void llTakeControls() { }
|
||||
public void llReleaseControls() { }
|
||||
public void llAttachToAvatar() { }
|
||||
public void llDetachFromAvatar() { }
|
||||
public void llTakeCamera() { }
|
||||
public void llReleaseCamera() { }
|
||||
public void llGetOwner() { }
|
||||
public void llInstantMessage() { }
|
||||
public void llEmail() { }
|
||||
public void llGetNextEmail() { }
|
||||
public void llGetKey() { }
|
||||
public void llSetBuoyancy() { }
|
||||
public void llSetHoverHeight() { }
|
||||
public void llStopHover() { }
|
||||
public void llMinEventDelay() { }
|
||||
public void llSoundPreload() { }
|
||||
public void llRotLookAt() { }
|
||||
public void llStringLength() { }
|
||||
public void llStartAnimation() { }
|
||||
public void llStopAnimation() { }
|
||||
public void llPointAt() { }
|
||||
public void llStopPointAt() { }
|
||||
public void llTargetOmega() { }
|
||||
public void llGetStartParameter() { }
|
||||
public void llGodLikeRezObject() { }
|
||||
public void llRequestPermissions() { }
|
||||
public void llGetPermissionsKey() { }
|
||||
public void llGetPermissions() { }
|
||||
public void llGetLinkNumber() { }
|
||||
public void llSetLinkColor() { }
|
||||
public void llCreateLink() { }
|
||||
public void llBreakLink() { }
|
||||
public void llBreakAllLinks() { }
|
||||
public void llGetLinkKey() { }
|
||||
public void llGetLinkName() { }
|
||||
public void llGetInventoryNumber() { }
|
||||
public void llGetInventoryName() { }
|
||||
public void llSetScriptState() { }
|
||||
public void llGetEnergy() { }
|
||||
public void llGiveInventory() { }
|
||||
public void llRemoveInventory() { }
|
||||
public void llSetText() { }
|
||||
public void llWater() { }
|
||||
public void llPassTouches() { }
|
||||
public void llRequestAgentData() { }
|
||||
public void llRequestInventoryData() { }
|
||||
public void llSetDamage() { }
|
||||
public void llTeleportAgentHome() { }
|
||||
public void llModifyLand() { }
|
||||
public void llCollisionSound() { }
|
||||
public void llCollisionSprite() { }
|
||||
public void llGetAnimation() { }
|
||||
public void llResetScript() { }
|
||||
public void llMessageLinked() { }
|
||||
public void llPushObject() { }
|
||||
public void llPassCollisions() { }
|
||||
public void llGetScriptName() { }
|
||||
public void llGetNumberOfSides() { }
|
||||
public void llAxisAngle2Rot() { }
|
||||
public void llRot2Axis() { }
|
||||
public void llRot2Angle() { }
|
||||
public void llAcos() { }
|
||||
public void llAsin() { }
|
||||
public void llAngleBetween() { }
|
||||
public void llGetInventoryKey() { }
|
||||
public void llAllowInventoryDrop() { }
|
||||
public void llGetSunDirection() { }
|
||||
public void llGetTextureOffset() { }
|
||||
public void llGetTextureScale() { }
|
||||
public void llGetTextureRot() { }
|
||||
public void llSubStringIndex() { }
|
||||
public void llGetOwnerKey() { }
|
||||
public void llGetCenterOfMass() { }
|
||||
public void llListSort() { }
|
||||
public void llGetListLength() { }
|
||||
public void llList2Integer() { }
|
||||
public void llList2Float() { }
|
||||
public void llList2String() { }
|
||||
public void llList2Key() { }
|
||||
public void llList2Vector() { }
|
||||
public void llList2Rot() { }
|
||||
public void llList2List() { }
|
||||
public void llDeleteSubList() { }
|
||||
public void llGetListEntryType() { }
|
||||
public void llList2CSV() { }
|
||||
public void llCSV2List() { }
|
||||
public void llListRandomize() { }
|
||||
public void llList2ListStrided() { }
|
||||
public void llGetRegionCorner() { }
|
||||
public void llListInsertList() { }
|
||||
public void llListFindList() { }
|
||||
public void llGetObjectName() { }
|
||||
public void llSetObjectName() { }
|
||||
public void llGetDate() { }
|
||||
public void llEdgeOfWorld() { }
|
||||
public void llGetAgentInfo() { }
|
||||
public void llAdjustSoundVolume() { }
|
||||
public void llSetSoundQueueing() { }
|
||||
public void llSetSoundRadius() { }
|
||||
public void llKey2Name() { }
|
||||
public void llSetTextureAnim() { }
|
||||
public void llTriggerSoundLimited() { }
|
||||
public void llEjectFromLand() { }
|
||||
public void llParseString2List() { }
|
||||
public void llOverMyLand() { }
|
||||
public void llGetLandOwnerAt() { }
|
||||
public void llGetNotecardLine() { }
|
||||
public void llGetAgentSize() { }
|
||||
public void llSameGroup() { }
|
||||
public void llUnSit() { }
|
||||
public void llGroundSlope() { }
|
||||
public void llGroundNormal() { }
|
||||
public void llGroundContour() { }
|
||||
public void llGetAttached() { }
|
||||
public void llGetFreeMemory() { }
|
||||
public void llGetRegionName() { }
|
||||
public void llGetRegionTimeDilation() { }
|
||||
public void llGetRegionFPS() { }
|
||||
public void llParticleSystem() { }
|
||||
public void llGroundRepel() { }
|
||||
public void llGiveInventoryList() { }
|
||||
public void llSetVehicleType() { }
|
||||
public void llSetVehicleFloatParam() { }
|
||||
public void llSetVehicleVectorParam() { }
|
||||
public void llSetVehicleRotationParam() { }
|
||||
public void llSetVehicleFlags() { }
|
||||
public void llRemoveVehicleFlags() { }
|
||||
public void llSitTarget() { }
|
||||
public void llAvatarOnSitTarget() { }
|
||||
public void llAddToLandPassList() { }
|
||||
public void llSetTouchText() { }
|
||||
public void llSetSitText() { }
|
||||
public void llSetCameraEyeOffset() { }
|
||||
public void llSetCameraAtOffset() { }
|
||||
public void llDumpList2String() { }
|
||||
public void llScriptDanger() { }
|
||||
public void llDialog() { }
|
||||
public void llVolumeDetect() { }
|
||||
public void llResetOtherScript() { }
|
||||
public void llGetScriptState() { }
|
||||
public void llRemoteLoadScript() { }
|
||||
public void llSetRemoteScriptAccessPin() { }
|
||||
public void llRemoteLoadScriptPin() { }
|
||||
public void llOpenRemoteDataChannel() { }
|
||||
public void llSendRemoteData() { }
|
||||
public void llRemoteDataReply() { }
|
||||
public void llCloseRemoteDataChannel() { }
|
||||
public void llMD5String() { }
|
||||
public void llSetPrimitiveParams() { }
|
||||
public void llStringToBase64() { }
|
||||
public void llBase64ToString() { }
|
||||
public void llXorBase64Strings() { }
|
||||
public void llRemoteDataSetRegion() { }
|
||||
public void llLog10() { }
|
||||
public void llLog() { }
|
||||
public void llGetAnimationList() { }
|
||||
public void llSetParcelMusicURL() { }
|
||||
public void llGetRootPosition() { }
|
||||
public void llGetRootRotation() { }
|
||||
public void llGetObjectDesc() { }
|
||||
public void llSetObjectDesc() { }
|
||||
public void llGetCreator() { }
|
||||
public void llGetTimestamp() { }
|
||||
public void llSetLinkAlpha() { }
|
||||
public void llGetNumberOfPrims() { }
|
||||
public void llGetNumberOfNotecardLines() { }
|
||||
public void llGetBoundingBox() { }
|
||||
public void llGetGeometricCenter() { }
|
||||
public void llGetPrimitiveParams() { }
|
||||
public void llIntegerToBase64() { }
|
||||
public void llBase64ToInteger() { }
|
||||
public void llGetGMTclock() { }
|
||||
public void llGetSimulatorHostname() { }
|
||||
public void llSetLocalRot() { }
|
||||
public void llParseStringKeepNulls() { }
|
||||
public void llRezAtRoot() { }
|
||||
public void llGetObjectPermMask() { }
|
||||
public void llSetObjectPermMask() { }
|
||||
public void llGetInventoryPermMask() { }
|
||||
public void llSetInventoryPermMask() { }
|
||||
public void llGetInventoryCreator() { }
|
||||
public void llOwnerSay() { }
|
||||
public void llRequestSimulatorData() { }
|
||||
public void llForceMouselook() { }
|
||||
public void llGetObjectMass() { }
|
||||
public void llListReplaceList() { }
|
||||
public void llLoadURL() { }
|
||||
public void llParcelMediaCommandList() { }
|
||||
public void llParcelMediaQuery() { }
|
||||
public void llModPow() { }
|
||||
public void llGetInventoryType() { }
|
||||
public void llSetPayPrice() { }
|
||||
public void llGetCameraPos() { }
|
||||
public void llGetCameraRot() { }
|
||||
public void llSetPrimURL() { }
|
||||
public void llRefreshPrimURL() { }
|
||||
public void llEscapeURL() { }
|
||||
public void llUnescapeURL() { }
|
||||
public void llMapDestination() { }
|
||||
public void llAddToLandBanList() { }
|
||||
public void llRemoveFromLandPassList() { }
|
||||
public void llRemoveFromLandBanList() { }
|
||||
public void llSetCameraParams() { }
|
||||
public void llClearCameraParams() { }
|
||||
public void llListStatistics() { }
|
||||
public void llGetUnixTime() { }
|
||||
public void llGetParcelFlags() { }
|
||||
public void llGetRegionFlags() { }
|
||||
public void llXorBase64StringsCorrect() { }
|
||||
public void llHTTPRequest() { }
|
||||
public void llResetLandBanList() { }
|
||||
public void llResetLandPassList() { }
|
||||
public void llGetParcelPrimCount() { }
|
||||
public void llGetParcelPrimOwners() { }
|
||||
public void llGetObjectPrimCount() { }
|
||||
public void llGetParcelMaxPrims() { }
|
||||
public void llGetParcelDetails() { }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSim Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
/* Original code: Tedd Hansen */
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenSim.Region.Scripting.LSL
|
||||
{
|
||||
public class LSL_BuiltIn_Commands_TestImplementation: LSL_BuiltIn_Commands_Interface
|
||||
{
|
||||
public LSL_BuiltIn_Commands_TestImplementation()
|
||||
{
|
||||
Common.SendToDebug("LSL_BuiltIn_Commands_TestImplementation: Creating object");
|
||||
}
|
||||
|
||||
public void llSin() { }
|
||||
public void llCos() { }
|
||||
public void llTan() { }
|
||||
public void llAtan2() { }
|
||||
public void llSqrt() { }
|
||||
public void llPow() { }
|
||||
public void llAbs() { }
|
||||
public void llFabs() { }
|
||||
public void llFrand() { }
|
||||
public void llFloor() { }
|
||||
public void llCeil() { }
|
||||
public void llRound() { }
|
||||
public void llVecMag() { }
|
||||
public void llVecNorm() { }
|
||||
public void llVecDist() { }
|
||||
public void llRot2Euler() { }
|
||||
public void llEuler2Rot() { }
|
||||
public void llAxes2Rot() { }
|
||||
public void llRot2Fwd() { }
|
||||
public void llRot2Left() { }
|
||||
public void llRot2Up() { }
|
||||
public void llRotBetween() { }
|
||||
public void llWhisper() { }
|
||||
public void llSay(UInt32 channelID, string text)
|
||||
{
|
||||
Common.SendToDebug("INTERNAL FUNCTION llSay(" + channelID + ", \"" + text + "\");");
|
||||
}
|
||||
public void llShout() { }
|
||||
public void llListen() { }
|
||||
public void llListenControl() { }
|
||||
public void llListenRemove() { }
|
||||
public void llSensor() { }
|
||||
public void llSensorRepeat() { }
|
||||
public void llSensorRemove() { }
|
||||
public void llDetectedName() { }
|
||||
public void llDetectedKey() { }
|
||||
public void llDetectedOwner() { }
|
||||
public void llDetectedType() { }
|
||||
public void llDetectedPos() { }
|
||||
public void llDetectedVel() { }
|
||||
public void llDetectedGrab() { }
|
||||
public void llDetectedRot() { }
|
||||
public void llDetectedGroup() { }
|
||||
public void llDetectedLinkNumber() { }
|
||||
public void llDie() { }
|
||||
public void llGround() { }
|
||||
public void llCloud() { }
|
||||
public void llWind() { }
|
||||
public void llSetStatus() { }
|
||||
public void llGetStatus() { }
|
||||
public void llSetScale() { }
|
||||
public void llGetScale() { }
|
||||
public void llSetColor() { }
|
||||
public void llGetAlpha() { }
|
||||
public void llSetAlpha() { }
|
||||
public void llGetColor() { }
|
||||
public void llSetTexture() { }
|
||||
public void llScaleTexture() { }
|
||||
public void llOffsetTexture() { }
|
||||
public void llRotateTexture() { }
|
||||
public void llGetTexture() { }
|
||||
public void llSetPos() { }
|
||||
public void llGetPos() { }
|
||||
public void llGetLocalPos() { }
|
||||
public void llSetRot() { }
|
||||
public void llGetRot() { }
|
||||
public void llGetLocalRot() { }
|
||||
public void llSetForce() { }
|
||||
public void llGetForce() { }
|
||||
public void llTarget() { }
|
||||
public void llTargetRemove() { }
|
||||
public void llRotTarget() { }
|
||||
public void llRotTargetRemove() { }
|
||||
public void llMoveToTarget() { }
|
||||
public void llStopMoveToTarget() { }
|
||||
public void llApplyImpulse() { }
|
||||
public void llApplyRotationalImpulse() { }
|
||||
public void llSetTorque() { }
|
||||
public void llGetTorque() { }
|
||||
public void llSetForceAndTorque() { }
|
||||
public void llGetVel() { }
|
||||
public void llGetAccel() { }
|
||||
public void llGetOmega() { }
|
||||
public void llGetTimeOfDay() { }
|
||||
public void llGetWallclock() { }
|
||||
public void llGetTime() { }
|
||||
public void llResetTime() { }
|
||||
public void llGetAndResetTime() { }
|
||||
public void llSound() { }
|
||||
public void llPlaySound() { }
|
||||
public void llLoopSound() { }
|
||||
public void llLoopSoundMaster() { }
|
||||
public void llLoopSoundSlave() { }
|
||||
public void llPlaySoundSlave() { }
|
||||
public void llTriggerSound() { }
|
||||
public void llStopSound() { }
|
||||
public void llPreloadSound() { }
|
||||
public void llGetSubString() { }
|
||||
public void llDeleteSubString() { }
|
||||
public void llInsertString() { }
|
||||
public void llToUpper() { }
|
||||
public void llToLower() { }
|
||||
public void llGiveMoney() { }
|
||||
public void llMakeExplosion() { }
|
||||
public void llMakeFountain() { }
|
||||
public void llMakeSmoke() { }
|
||||
public void llMakeFire() { }
|
||||
public void llRezObject() { }
|
||||
public void llLookAt() { }
|
||||
public void llStopLookAt() { }
|
||||
public void llSetTimerEvent() { }
|
||||
public void llSleep() { }
|
||||
public void llGetMass() { }
|
||||
public void llCollisionFilter() { }
|
||||
public void llTakeControls() { }
|
||||
public void llReleaseControls() { }
|
||||
public void llAttachToAvatar() { }
|
||||
public void llDetachFromAvatar() { }
|
||||
public void llTakeCamera() { }
|
||||
public void llReleaseCamera() { }
|
||||
public void llGetOwner() { }
|
||||
public void llInstantMessage() { }
|
||||
public void llEmail() { }
|
||||
public void llGetNextEmail() { }
|
||||
public void llGetKey() { }
|
||||
public void llSetBuoyancy() { }
|
||||
public void llSetHoverHeight() { }
|
||||
public void llStopHover() { }
|
||||
public void llMinEventDelay() { }
|
||||
public void llSoundPreload() { }
|
||||
public void llRotLookAt() { }
|
||||
public void llStringLength() { }
|
||||
public void llStartAnimation() { }
|
||||
public void llStopAnimation() { }
|
||||
public void llPointAt() { }
|
||||
public void llStopPointAt() { }
|
||||
public void llTargetOmega() { }
|
||||
public void llGetStartParameter() { }
|
||||
public void llGodLikeRezObject() { }
|
||||
public void llRequestPermissions() { }
|
||||
public void llGetPermissionsKey() { }
|
||||
public void llGetPermissions() { }
|
||||
public void llGetLinkNumber() { }
|
||||
public void llSetLinkColor() { }
|
||||
public void llCreateLink() { }
|
||||
public void llBreakLink() { }
|
||||
public void llBreakAllLinks() { }
|
||||
public void llGetLinkKey() { }
|
||||
public void llGetLinkName() { }
|
||||
public void llGetInventoryNumber() { }
|
||||
public void llGetInventoryName() { }
|
||||
public void llSetScriptState() { }
|
||||
public void llGetEnergy() { }
|
||||
public void llGiveInventory() { }
|
||||
public void llRemoveInventory() { }
|
||||
public void llSetText() { }
|
||||
public void llWater() { }
|
||||
public void llPassTouches() { }
|
||||
public void llRequestAgentData() { }
|
||||
public void llRequestInventoryData() { }
|
||||
public void llSetDamage() { }
|
||||
public void llTeleportAgentHome() { }
|
||||
public void llModifyLand() { }
|
||||
public void llCollisionSound() { }
|
||||
public void llCollisionSprite() { }
|
||||
public void llGetAnimation() { }
|
||||
public void llResetScript() { }
|
||||
public void llMessageLinked() { }
|
||||
public void llPushObject() { }
|
||||
public void llPassCollisions() { }
|
||||
public void llGetScriptName() { }
|
||||
public void llGetNumberOfSides() { }
|
||||
public void llAxisAngle2Rot() { }
|
||||
public void llRot2Axis() { }
|
||||
public void llRot2Angle() { }
|
||||
public void llAcos() { }
|
||||
public void llAsin() { }
|
||||
public void llAngleBetween() { }
|
||||
public void llGetInventoryKey() { }
|
||||
public void llAllowInventoryDrop() { }
|
||||
public void llGetSunDirection() { }
|
||||
public void llGetTextureOffset() { }
|
||||
public void llGetTextureScale() { }
|
||||
public void llGetTextureRot() { }
|
||||
public void llSubStringIndex() { }
|
||||
public void llGetOwnerKey() { }
|
||||
public void llGetCenterOfMass() { }
|
||||
public void llListSort() { }
|
||||
public void llGetListLength() { }
|
||||
public void llList2Integer() { }
|
||||
public void llList2Float() { }
|
||||
public void llList2String() { }
|
||||
public void llList2Key() { }
|
||||
public void llList2Vector() { }
|
||||
public void llList2Rot() { }
|
||||
public void llList2List() { }
|
||||
public void llDeleteSubList() { }
|
||||
public void llGetListEntryType() { }
|
||||
public void llList2CSV() { }
|
||||
public void llCSV2List() { }
|
||||
public void llListRandomize() { }
|
||||
public void llList2ListStrided() { }
|
||||
public void llGetRegionCorner() { }
|
||||
public void llListInsertList() { }
|
||||
public void llListFindList() { }
|
||||
public void llGetObjectName() { }
|
||||
public void llSetObjectName() { }
|
||||
public void llGetDate() { }
|
||||
public void llEdgeOfWorld() { }
|
||||
public void llGetAgentInfo() { }
|
||||
public void llAdjustSoundVolume() { }
|
||||
public void llSetSoundQueueing() { }
|
||||
public void llSetSoundRadius() { }
|
||||
public void llKey2Name() { }
|
||||
public void llSetTextureAnim() { }
|
||||
public void llTriggerSoundLimited() { }
|
||||
public void llEjectFromLand() { }
|
||||
public void llParseString2List() { }
|
||||
public void llOverMyLand() { }
|
||||
public void llGetLandOwnerAt() { }
|
||||
public void llGetNotecardLine() { }
|
||||
public void llGetAgentSize() { }
|
||||
public void llSameGroup() { }
|
||||
public void llUnSit() { }
|
||||
public void llGroundSlope() { }
|
||||
public void llGroundNormal() { }
|
||||
public void llGroundContour() { }
|
||||
public void llGetAttached() { }
|
||||
public void llGetFreeMemory() { }
|
||||
public void llGetRegionName() { }
|
||||
public void llGetRegionTimeDilation() { }
|
||||
public void llGetRegionFPS() { }
|
||||
public void llParticleSystem() { }
|
||||
public void llGroundRepel() { }
|
||||
public void llGiveInventoryList() { }
|
||||
public void llSetVehicleType() { }
|
||||
public void llSetVehicleFloatParam() { }
|
||||
public void llSetVehicleVectorParam() { }
|
||||
public void llSetVehicleRotationParam() { }
|
||||
public void llSetVehicleFlags() { }
|
||||
public void llRemoveVehicleFlags() { }
|
||||
public void llSitTarget() { }
|
||||
public void llAvatarOnSitTarget() { }
|
||||
public void llAddToLandPassList() { }
|
||||
public void llSetTouchText() { }
|
||||
public void llSetSitText() { }
|
||||
public void llSetCameraEyeOffset() { }
|
||||
public void llSetCameraAtOffset() { }
|
||||
public void llDumpList2String() { }
|
||||
public void llScriptDanger() { }
|
||||
public void llDialog() { }
|
||||
public void llVolumeDetect() { }
|
||||
public void llResetOtherScript() { }
|
||||
public void llGetScriptState() { }
|
||||
public void llRemoteLoadScript() { }
|
||||
public void llSetRemoteScriptAccessPin() { }
|
||||
public void llRemoteLoadScriptPin() { }
|
||||
public void llOpenRemoteDataChannel() { }
|
||||
public void llSendRemoteData() { }
|
||||
public void llRemoteDataReply() { }
|
||||
public void llCloseRemoteDataChannel() { }
|
||||
public void llMD5String() { }
|
||||
public void llSetPrimitiveParams() { }
|
||||
public void llStringToBase64() { }
|
||||
public void llBase64ToString() { }
|
||||
public void llXorBase64Strings() { }
|
||||
public void llRemoteDataSetRegion() { }
|
||||
public void llLog10() { }
|
||||
public void llLog() { }
|
||||
public void llGetAnimationList() { }
|
||||
public void llSetParcelMusicURL() { }
|
||||
public void llGetRootPosition() { }
|
||||
public void llGetRootRotation() { }
|
||||
public void llGetObjectDesc() { }
|
||||
public void llSetObjectDesc() { }
|
||||
public void llGetCreator() { }
|
||||
public void llGetTimestamp() { }
|
||||
public void llSetLinkAlpha() { }
|
||||
public void llGetNumberOfPrims() { }
|
||||
public void llGetNumberOfNotecardLines() { }
|
||||
public void llGetBoundingBox() { }
|
||||
public void llGetGeometricCenter() { }
|
||||
public void llGetPrimitiveParams() { }
|
||||
public void llIntegerToBase64() { }
|
||||
public void llBase64ToInteger() { }
|
||||
public void llGetGMTclock() { }
|
||||
public void llGetSimulatorHostname() { }
|
||||
public void llSetLocalRot() { }
|
||||
public void llParseStringKeepNulls() { }
|
||||
public void llRezAtRoot() { }
|
||||
public void llGetObjectPermMask() { }
|
||||
public void llSetObjectPermMask() { }
|
||||
public void llGetInventoryPermMask() { }
|
||||
public void llSetInventoryPermMask() { }
|
||||
public void llGetInventoryCreator() { }
|
||||
public void llOwnerSay() { }
|
||||
public void llRequestSimulatorData() { }
|
||||
public void llForceMouselook() { }
|
||||
public void llGetObjectMass() { }
|
||||
public void llListReplaceList() { }
|
||||
public void llLoadURL() { }
|
||||
public void llParcelMediaCommandList() { }
|
||||
public void llParcelMediaQuery() { }
|
||||
public void llModPow() { }
|
||||
public void llGetInventoryType() { }
|
||||
public void llSetPayPrice() { }
|
||||
public void llGetCameraPos() { }
|
||||
public void llGetCameraRot() { }
|
||||
public void llSetPrimURL() { }
|
||||
public void llRefreshPrimURL() { }
|
||||
public void llEscapeURL() { }
|
||||
public void llUnescapeURL() { }
|
||||
public void llMapDestination() { }
|
||||
public void llAddToLandBanList() { }
|
||||
public void llRemoveFromLandPassList() { }
|
||||
public void llRemoveFromLandBanList() { }
|
||||
public void llSetCameraParams() { }
|
||||
public void llClearCameraParams() { }
|
||||
public void llListStatistics() { }
|
||||
public void llGetUnixTime() { }
|
||||
public void llGetParcelFlags() { }
|
||||
public void llGetRegionFlags() { }
|
||||
public void llXorBase64StringsCorrect() { }
|
||||
public void llHTTPRequest() { }
|
||||
public void llResetLandBanList() { }
|
||||
public void llResetLandPassList() { }
|
||||
public void llGetParcelPrimCount() { }
|
||||
public void llGetParcelPrimOwners() { }
|
||||
public void llGetObjectPrimCount() { }
|
||||
public void llGetParcelMaxPrims() { }
|
||||
public void llGetParcelDetails() { }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,351 +1,351 @@
|
||||
/*
|
||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSim Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
/* Original code: Tedd Hansen */
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
|
||||
namespace OpenSim.Region.Scripting.LSL
|
||||
{
|
||||
partial class LSO_Parser
|
||||
{
|
||||
//LSO_Enums MyLSO_Enums = new LSO_Enums();
|
||||
|
||||
internal bool LSL_PROCESS_OPCODE(ILGenerator il)
|
||||
{
|
||||
|
||||
byte bp1;
|
||||
UInt32 u32p1;
|
||||
UInt16 opcode = br_read(1)[0];
|
||||
Common.SendToDebug("OPCODE: " + ((LSO_Enums.Operation_Table)opcode).ToString());
|
||||
string idesc = ((LSO_Enums.Operation_Table)opcode).ToString();
|
||||
switch ((LSO_Enums.Operation_Table)opcode)
|
||||
{
|
||||
|
||||
case LSO_Enums.Operation_Table.POP:
|
||||
case LSO_Enums.Operation_Table.POPL:
|
||||
case LSO_Enums.Operation_Table.POPV:
|
||||
case LSO_Enums.Operation_Table.POPQ:
|
||||
case LSO_Enums.Operation_Table.POPIP:
|
||||
case LSO_Enums.Operation_Table.POPBP:
|
||||
case LSO_Enums.Operation_Table.POPSP:
|
||||
case LSO_Enums.Operation_Table.POPSLR:
|
||||
// ignore -- builds callframe
|
||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Pop);");
|
||||
il.Emit(OpCodes.Pop);
|
||||
break;
|
||||
case LSO_Enums.Operation_Table.POPARG:
|
||||
Common.SendToDebug("Instruction " + idesc + ": Ignored");
|
||||
Common.SendToDebug("Instruction " + idesc + ": Description: Drop x bytes from the stack ");
|
||||
Common.SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
break;
|
||||
|
||||
// LONG
|
||||
case LSO_Enums.Operation_Table.STORE:
|
||||
case LSO_Enums.Operation_Table.STORES:
|
||||
case LSO_Enums.Operation_Table.STOREL:
|
||||
case LSO_Enums.Operation_Table.STOREV:
|
||||
case LSO_Enums.Operation_Table.STOREQ:
|
||||
case LSO_Enums.Operation_Table.STOREG:
|
||||
case LSO_Enums.Operation_Table.STOREGS:
|
||||
case LSO_Enums.Operation_Table.STOREGL:
|
||||
case LSO_Enums.Operation_Table.STOREGV:
|
||||
case LSO_Enums.Operation_Table.STOREGQ:
|
||||
case LSO_Enums.Operation_Table.LOADP:
|
||||
case LSO_Enums.Operation_Table.LOADSP:
|
||||
case LSO_Enums.Operation_Table.LOADLP:
|
||||
case LSO_Enums.Operation_Table.LOADVP:
|
||||
case LSO_Enums.Operation_Table.LOADQP:
|
||||
case LSO_Enums.Operation_Table.PUSH:
|
||||
case LSO_Enums.Operation_Table.PUSHS:
|
||||
case LSO_Enums.Operation_Table.PUSHL:
|
||||
case LSO_Enums.Operation_Table.PUSHV:
|
||||
case LSO_Enums.Operation_Table.PUSHQ:
|
||||
case LSO_Enums.Operation_Table.PUSHG:
|
||||
case LSO_Enums.Operation_Table.PUSHGS:
|
||||
case LSO_Enums.Operation_Table.PUSHGL:
|
||||
case LSO_Enums.Operation_Table.PUSHGV:
|
||||
case LSO_Enums.Operation_Table.PUSHGQ:
|
||||
Common.SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
break;
|
||||
// None
|
||||
case LSO_Enums.Operation_Table.PUSHIP:
|
||||
case LSO_Enums.Operation_Table.PUSHBP:
|
||||
case LSO_Enums.Operation_Table.PUSHSP:
|
||||
// Push Stack Top (Memory Address) to stack
|
||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Ldc_I4, " + myHeader.SP + ");");
|
||||
Common.SendToDebug("Instruction " + idesc + ": Description: Pushing Stack Top (Memory Address from header) to stack");
|
||||
il.Emit(OpCodes.Ldc_I4, myHeader.SP);
|
||||
break;
|
||||
// BYTE
|
||||
case LSO_Enums.Operation_Table.PUSHARGB:
|
||||
Common.SendToDebug("Param1: " + br_read(1)[0]);
|
||||
break;
|
||||
// INTEGER
|
||||
case LSO_Enums.Operation_Table.PUSHARGI:
|
||||
// TODO: What is size of integer?
|
||||
u32p1 = BitConverter.ToUInt32(br_read(4), 0);
|
||||
Common.SendToDebug("Instruction PUSHSP: il.Emit(OpCodes.Ldc_I4, " + u32p1 + ");");
|
||||
Common.SendToDebug("Param1: " + u32p1);
|
||||
il.Emit(OpCodes.Ldc_I4, u32p1);
|
||||
break;
|
||||
// FLOAT
|
||||
case LSO_Enums.Operation_Table.PUSHARGF:
|
||||
// TODO: What is size of float?
|
||||
Common.SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
break;
|
||||
// STRING
|
||||
case LSO_Enums.Operation_Table.PUSHARGS:
|
||||
string s = Read_String();
|
||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Ldstr, \"" + s + "\");");
|
||||
Common.SendToDebug("Param1: " + s);
|
||||
il.Emit(OpCodes.Ldstr, s);
|
||||
break;
|
||||
// VECTOR z,y,x
|
||||
case LSO_Enums.Operation_Table.PUSHARGV:
|
||||
Common.SendToDebug("Param1 Z: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
Common.SendToDebug("Param1 Y: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
Common.SendToDebug("Param1 X: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
break;
|
||||
// ROTATION s,z,y,x
|
||||
case LSO_Enums.Operation_Table.PUSHARGQ:
|
||||
Common.SendToDebug("Param1 S: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
Common.SendToDebug("Param1 Z: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
Common.SendToDebug("Param1 Y: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
Common.SendToDebug("Param1 X: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
break;
|
||||
// LONG
|
||||
case LSO_Enums.Operation_Table.PUSHARGE:
|
||||
u32p1 = BitConverter.ToUInt32(br_read(4), 0);
|
||||
//Common.SendToDebug("Instruction PUSHSP: il.Emit(OpCodes., " + u32p1 + ");");
|
||||
Common.SendToDebug("Instruction " + idesc + ": Ignoring (not in use according to doc)");
|
||||
//Common.SendToDebug("Instruction " + idesc + ": Description: Pushes X bytes of $00 onto the stack (used to put space for local variable memory for a call)");
|
||||
Common.SendToDebug("Param1: " + u32p1);
|
||||
//il.Emit(OpCodes.ldc_i4, u32p1);
|
||||
//if (u32p1 > 0) {
|
||||
//for (int _ic=0; _ic < u32p1; _ic++)
|
||||
//{
|
||||
// Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Ldnull);");
|
||||
// il.Emit(OpCodes.Ldnull);
|
||||
//}
|
||||
break;
|
||||
// BYTE
|
||||
case LSO_Enums.Operation_Table.ADD:
|
||||
bp1 = br_read(1)[0];
|
||||
Common.SendToDebug("Instruction " + idesc + ": Add type: " + ((LSO_Enums.OpCode_Add_TypeDefs)bp1).ToString());
|
||||
Common.SendToDebug("Param1: " + bp1);
|
||||
switch ((LSO_Enums.OpCode_Add_TypeDefs)bp1)
|
||||
{
|
||||
case LSO_Enums.OpCode_Add_TypeDefs.String:
|
||||
Common.SendToDebug("Instruction " + idesc
|
||||
+ ": il.Emit(OpCodes.Call, typeof(System.String).GetMethod(\"Concat\", new Type[] { typeof(object), typeof(object) }));");
|
||||
il.Emit(OpCodes.Call, typeof(System.String).GetMethod
|
||||
("Concat", new Type[] { typeof(object), typeof(object) }));
|
||||
|
||||
break;
|
||||
case LSO_Enums.OpCode_Add_TypeDefs.UInt32:
|
||||
default:
|
||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Add);");
|
||||
il.Emit(OpCodes.Add);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
//il.Emit(OpCodes.Add, p1);
|
||||
break;
|
||||
case LSO_Enums.Operation_Table.SUB:
|
||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Sub);");
|
||||
bp1 = br_read(1)[0];
|
||||
Common.SendToDebug("Param1: " + bp1);
|
||||
il.Emit(OpCodes.Sub);
|
||||
//il.Emit(OpCodes.Sub, p1);
|
||||
break;
|
||||
case LSO_Enums.Operation_Table.MUL:
|
||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Mul);");
|
||||
bp1 = br_read(1)[0];
|
||||
Common.SendToDebug("Param1: " + bp1);
|
||||
il.Emit(OpCodes.Mul);
|
||||
//il.Emit(OpCodes.Mul, p1);
|
||||
break;
|
||||
case LSO_Enums.Operation_Table.DIV:
|
||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Div);");
|
||||
bp1 = br_read(1)[0];
|
||||
Common.SendToDebug("Param1: " + bp1);
|
||||
il.Emit(OpCodes.Div);
|
||||
//il.Emit(OpCodes.Div, p1);
|
||||
break;
|
||||
case LSO_Enums.Operation_Table.EQ:
|
||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Ceq);");
|
||||
bp1 = br_read(1)[0];
|
||||
Common.SendToDebug("Param1: " + bp1);
|
||||
il.Emit(OpCodes.Ceq);
|
||||
//il.Emit(OpCodes.Ceq, p1);
|
||||
break;
|
||||
case LSO_Enums.Operation_Table.NEQ:
|
||||
case LSO_Enums.Operation_Table.LEQ:
|
||||
case LSO_Enums.Operation_Table.GEQ:
|
||||
case LSO_Enums.Operation_Table.LESS:
|
||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Clt_Un);");
|
||||
bp1 = br_read(1)[0];
|
||||
Common.SendToDebug("Param1: " + bp1);
|
||||
il.Emit(OpCodes.Clt_Un);
|
||||
//il.Emit(OpCodes.Clt, p1);
|
||||
break;
|
||||
case LSO_Enums.Operation_Table.GREATER:
|
||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Cgt_Un);");
|
||||
bp1 = br_read(1)[0];
|
||||
Common.SendToDebug("Param1: " + bp1);
|
||||
il.Emit(OpCodes.Cgt_Un);
|
||||
//il.Emit(OpCodes.Cgt, p1);
|
||||
break;
|
||||
case LSO_Enums.Operation_Table.MOD:
|
||||
case LSO_Enums.Operation_Table.BOOLOR:
|
||||
bp1 = br_read(1)[0];
|
||||
Common.SendToDebug("Param1: " + bp1);
|
||||
break;
|
||||
// LONG
|
||||
case LSO_Enums.Operation_Table.JUMP:
|
||||
Common.SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
break;
|
||||
// BYTE, LONG
|
||||
case LSO_Enums.Operation_Table.JUMPIF:
|
||||
case LSO_Enums.Operation_Table.JUMPNIF:
|
||||
Common.SendToDebug("Param1: " + br_read(1)[0]);
|
||||
Common.SendToDebug("Param2: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
break;
|
||||
// LONG
|
||||
case LSO_Enums.Operation_Table.STATE:
|
||||
bp1 = br_read(1)[0];
|
||||
//il.Emit(OpCodes.Ld); // Load local variable 0 onto stack
|
||||
//il.Emit(OpCodes.Ldc_I4, 0); // Push index position
|
||||
//il.Emit(OpCodes.Ldstr, EventList[p1]); // Push value
|
||||
//il.Emit(OpCodes.Stelem_Ref); // Perform array[index] = value
|
||||
break;
|
||||
case LSO_Enums.Operation_Table.CALL:
|
||||
Common.SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
break;
|
||||
// BYTE
|
||||
case LSO_Enums.Operation_Table.CAST:
|
||||
bp1 = br_read(1)[0];
|
||||
Common.SendToDebug("Instruction " + idesc + ": Cast to type: " + ((LSO_Enums.OpCode_Cast_TypeDefs)bp1));
|
||||
Common.SendToDebug("Param1: " + bp1);
|
||||
switch ((LSO_Enums.OpCode_Cast_TypeDefs)bp1)
|
||||
{
|
||||
case LSO_Enums.OpCode_Cast_TypeDefs.String:
|
||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Calli, typeof(System.Convert).GetMethod(\"ToString\", new Type[] { typeof(object) }));");
|
||||
//il.Emit(OpCodes.Box, typeof (UInt32));
|
||||
il.Emit(OpCodes.Calli, typeof(Common).GetMethod
|
||||
("Cast_ToString", new Type[] { typeof(object) }));
|
||||
|
||||
//il.Emit(OpCodes.Box, typeof(System.UInt32) );
|
||||
//il.Emit(OpCodes.Box, typeof(string));
|
||||
|
||||
//il.Emit(OpCodes.Conv_R8);
|
||||
//il.Emit(OpCodes.Call, typeof(System.Convert).GetMethod
|
||||
// ("ToString", new Type[] { typeof(float) }));
|
||||
|
||||
break;
|
||||
default:
|
||||
Common.SendToDebug("Instruction " + idesc + ": Unknown cast type!");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
// LONG
|
||||
case LSO_Enums.Operation_Table.STACKTOS:
|
||||
case LSO_Enums.Operation_Table.STACKTOL:
|
||||
Common.SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
break;
|
||||
// BYTE
|
||||
case LSO_Enums.Operation_Table.PRINT:
|
||||
case LSO_Enums.Operation_Table.CALLLIB:
|
||||
Common.SendToDebug("Param1: " + br_read(1)[0]);
|
||||
break;
|
||||
// SHORT
|
||||
case LSO_Enums.Operation_Table.CALLLIB_TWO_BYTE:
|
||||
// TODO: What is size of short?
|
||||
UInt16 U16p1 = BitConverter.ToUInt16(br_read(2), 0);
|
||||
Common.SendToDebug("Instruction " + idesc + ": Builtin Command: " + ((LSO_Enums.BuiltIn_Functions)U16p1).ToString());
|
||||
Common.SendToDebug("Param1: " + U16p1);
|
||||
switch ((LSO_Enums.BuiltIn_Functions)U16p1)
|
||||
{
|
||||
case LSO_Enums.BuiltIn_Functions.llSay:
|
||||
Common.SendToDebug("Instruction " + idesc + " " + ((LSO_Enums.BuiltIn_Functions)U16p1).ToString()
|
||||
+ ": Mapped to internal function");
|
||||
|
||||
//il.Emit(OpCodes.Ldstr, "INTERNAL COMMAND: llSay({0}, \"{1}\"");
|
||||
//il.Emit(OpCodes.Call, typeof(IL_Helper).GetMethod("ReverseFormatString",
|
||||
// new Type[] { typeof(string), typeof(UInt32), typeof(string) }
|
||||
//));
|
||||
|
||||
|
||||
//il.Emit(OpCodes.Pop);
|
||||
//il.Emit(OpCodes.Call,
|
||||
// typeof(Console).GetMethod("WriteLine",
|
||||
// new Type[] { typeof(string) }
|
||||
//));
|
||||
|
||||
|
||||
il.Emit(OpCodes.Call,
|
||||
typeof(Common).GetMethod("SendToLog",
|
||||
new Type[] { typeof(string) }
|
||||
));
|
||||
|
||||
|
||||
|
||||
//il.Emit(OpCodes.Pop);
|
||||
|
||||
//il.Emit(OpCodes.Ldind_I2, 0);
|
||||
|
||||
//il.Emit(OpCodes.Call, typeof(string).GetMethod("Format", new Type[] { typeof(string), typeof(object) }));
|
||||
//il.EmitCalli(OpCodes.Calli,
|
||||
//il.Emit(OpCodes.Call, typeof().GetMethod
|
||||
// ("llSay", new Type[] { typeof(UInt32), typeof(string) }));
|
||||
break;
|
||||
default:
|
||||
Common.SendToDebug("Instruction " + idesc + ": " + ((LSO_Enums.BuiltIn_Functions)U16p1).ToString() + ": INTERNAL COMMAND NOT IMPLEMENTED");
|
||||
break;
|
||||
}
|
||||
|
||||
//Common.SendToDebug("Instruction " + idesc + ": DEBUG: Faking return code:");
|
||||
//Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Ldc_I4, 0);");
|
||||
//il.Emit(OpCodes.Ldc_I4, 0);
|
||||
break;
|
||||
|
||||
// RETURN
|
||||
case LSO_Enums.Operation_Table.RETURN:
|
||||
|
||||
Common.SendToDebug("Last OPCODE was return command. Code chunk execution complete.");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSim Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
/* Original code: Tedd Hansen */
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
|
||||
namespace OpenSim.Region.Scripting.LSL
|
||||
{
|
||||
partial class LSO_Parser
|
||||
{
|
||||
//LSO_Enums MyLSO_Enums = new LSO_Enums();
|
||||
|
||||
internal bool LSL_PROCESS_OPCODE(ILGenerator il)
|
||||
{
|
||||
|
||||
byte bp1;
|
||||
UInt32 u32p1;
|
||||
UInt16 opcode = br_read(1)[0];
|
||||
Common.SendToDebug("OPCODE: " + ((LSO_Enums.Operation_Table)opcode).ToString());
|
||||
string idesc = ((LSO_Enums.Operation_Table)opcode).ToString();
|
||||
switch ((LSO_Enums.Operation_Table)opcode)
|
||||
{
|
||||
|
||||
case LSO_Enums.Operation_Table.POP:
|
||||
case LSO_Enums.Operation_Table.POPL:
|
||||
case LSO_Enums.Operation_Table.POPV:
|
||||
case LSO_Enums.Operation_Table.POPQ:
|
||||
case LSO_Enums.Operation_Table.POPIP:
|
||||
case LSO_Enums.Operation_Table.POPBP:
|
||||
case LSO_Enums.Operation_Table.POPSP:
|
||||
case LSO_Enums.Operation_Table.POPSLR:
|
||||
// ignore -- builds callframe
|
||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Pop);");
|
||||
il.Emit(OpCodes.Pop);
|
||||
break;
|
||||
case LSO_Enums.Operation_Table.POPARG:
|
||||
Common.SendToDebug("Instruction " + idesc + ": Ignored");
|
||||
Common.SendToDebug("Instruction " + idesc + ": Description: Drop x bytes from the stack ");
|
||||
Common.SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
break;
|
||||
|
||||
// LONG
|
||||
case LSO_Enums.Operation_Table.STORE:
|
||||
case LSO_Enums.Operation_Table.STORES:
|
||||
case LSO_Enums.Operation_Table.STOREL:
|
||||
case LSO_Enums.Operation_Table.STOREV:
|
||||
case LSO_Enums.Operation_Table.STOREQ:
|
||||
case LSO_Enums.Operation_Table.STOREG:
|
||||
case LSO_Enums.Operation_Table.STOREGS:
|
||||
case LSO_Enums.Operation_Table.STOREGL:
|
||||
case LSO_Enums.Operation_Table.STOREGV:
|
||||
case LSO_Enums.Operation_Table.STOREGQ:
|
||||
case LSO_Enums.Operation_Table.LOADP:
|
||||
case LSO_Enums.Operation_Table.LOADSP:
|
||||
case LSO_Enums.Operation_Table.LOADLP:
|
||||
case LSO_Enums.Operation_Table.LOADVP:
|
||||
case LSO_Enums.Operation_Table.LOADQP:
|
||||
case LSO_Enums.Operation_Table.PUSH:
|
||||
case LSO_Enums.Operation_Table.PUSHS:
|
||||
case LSO_Enums.Operation_Table.PUSHL:
|
||||
case LSO_Enums.Operation_Table.PUSHV:
|
||||
case LSO_Enums.Operation_Table.PUSHQ:
|
||||
case LSO_Enums.Operation_Table.PUSHG:
|
||||
case LSO_Enums.Operation_Table.PUSHGS:
|
||||
case LSO_Enums.Operation_Table.PUSHGL:
|
||||
case LSO_Enums.Operation_Table.PUSHGV:
|
||||
case LSO_Enums.Operation_Table.PUSHGQ:
|
||||
Common.SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
break;
|
||||
// None
|
||||
case LSO_Enums.Operation_Table.PUSHIP:
|
||||
case LSO_Enums.Operation_Table.PUSHBP:
|
||||
case LSO_Enums.Operation_Table.PUSHSP:
|
||||
// Push Stack Top (Memory Address) to stack
|
||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Ldc_I4, " + myHeader.SP + ");");
|
||||
Common.SendToDebug("Instruction " + idesc + ": Description: Pushing Stack Top (Memory Address from header) to stack");
|
||||
il.Emit(OpCodes.Ldc_I4, myHeader.SP);
|
||||
break;
|
||||
// BYTE
|
||||
case LSO_Enums.Operation_Table.PUSHARGB:
|
||||
Common.SendToDebug("Param1: " + br_read(1)[0]);
|
||||
break;
|
||||
// INTEGER
|
||||
case LSO_Enums.Operation_Table.PUSHARGI:
|
||||
// TODO: What is size of integer?
|
||||
u32p1 = BitConverter.ToUInt32(br_read(4), 0);
|
||||
Common.SendToDebug("Instruction PUSHSP: il.Emit(OpCodes.Ldc_I4, " + u32p1 + ");");
|
||||
Common.SendToDebug("Param1: " + u32p1);
|
||||
il.Emit(OpCodes.Ldc_I4, u32p1);
|
||||
break;
|
||||
// FLOAT
|
||||
case LSO_Enums.Operation_Table.PUSHARGF:
|
||||
// TODO: What is size of float?
|
||||
Common.SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
break;
|
||||
// STRING
|
||||
case LSO_Enums.Operation_Table.PUSHARGS:
|
||||
string s = Read_String();
|
||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Ldstr, \"" + s + "\");");
|
||||
Common.SendToDebug("Param1: " + s);
|
||||
il.Emit(OpCodes.Ldstr, s);
|
||||
break;
|
||||
// VECTOR z,y,x
|
||||
case LSO_Enums.Operation_Table.PUSHARGV:
|
||||
Common.SendToDebug("Param1 Z: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
Common.SendToDebug("Param1 Y: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
Common.SendToDebug("Param1 X: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
break;
|
||||
// ROTATION s,z,y,x
|
||||
case LSO_Enums.Operation_Table.PUSHARGQ:
|
||||
Common.SendToDebug("Param1 S: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
Common.SendToDebug("Param1 Z: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
Common.SendToDebug("Param1 Y: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
Common.SendToDebug("Param1 X: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
break;
|
||||
// LONG
|
||||
case LSO_Enums.Operation_Table.PUSHARGE:
|
||||
u32p1 = BitConverter.ToUInt32(br_read(4), 0);
|
||||
//Common.SendToDebug("Instruction PUSHSP: il.Emit(OpCodes., " + u32p1 + ");");
|
||||
Common.SendToDebug("Instruction " + idesc + ": Ignoring (not in use according to doc)");
|
||||
//Common.SendToDebug("Instruction " + idesc + ": Description: Pushes X bytes of $00 onto the stack (used to put space for local variable memory for a call)");
|
||||
Common.SendToDebug("Param1: " + u32p1);
|
||||
//il.Emit(OpCodes.ldc_i4, u32p1);
|
||||
//if (u32p1 > 0) {
|
||||
//for (int _ic=0; _ic < u32p1; _ic++)
|
||||
//{
|
||||
// Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Ldnull);");
|
||||
// il.Emit(OpCodes.Ldnull);
|
||||
//}
|
||||
break;
|
||||
// BYTE
|
||||
case LSO_Enums.Operation_Table.ADD:
|
||||
bp1 = br_read(1)[0];
|
||||
Common.SendToDebug("Instruction " + idesc + ": Add type: " + ((LSO_Enums.OpCode_Add_TypeDefs)bp1).ToString());
|
||||
Common.SendToDebug("Param1: " + bp1);
|
||||
switch ((LSO_Enums.OpCode_Add_TypeDefs)bp1)
|
||||
{
|
||||
case LSO_Enums.OpCode_Add_TypeDefs.String:
|
||||
Common.SendToDebug("Instruction " + idesc
|
||||
+ ": il.Emit(OpCodes.Call, typeof(System.String).GetMethod(\"Concat\", new Type[] { typeof(object), typeof(object) }));");
|
||||
il.Emit(OpCodes.Call, typeof(System.String).GetMethod
|
||||
("Concat", new Type[] { typeof(object), typeof(object) }));
|
||||
|
||||
break;
|
||||
case LSO_Enums.OpCode_Add_TypeDefs.UInt32:
|
||||
default:
|
||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Add);");
|
||||
il.Emit(OpCodes.Add);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
//il.Emit(OpCodes.Add, p1);
|
||||
break;
|
||||
case LSO_Enums.Operation_Table.SUB:
|
||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Sub);");
|
||||
bp1 = br_read(1)[0];
|
||||
Common.SendToDebug("Param1: " + bp1);
|
||||
il.Emit(OpCodes.Sub);
|
||||
//il.Emit(OpCodes.Sub, p1);
|
||||
break;
|
||||
case LSO_Enums.Operation_Table.MUL:
|
||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Mul);");
|
||||
bp1 = br_read(1)[0];
|
||||
Common.SendToDebug("Param1: " + bp1);
|
||||
il.Emit(OpCodes.Mul);
|
||||
//il.Emit(OpCodes.Mul, p1);
|
||||
break;
|
||||
case LSO_Enums.Operation_Table.DIV:
|
||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Div);");
|
||||
bp1 = br_read(1)[0];
|
||||
Common.SendToDebug("Param1: " + bp1);
|
||||
il.Emit(OpCodes.Div);
|
||||
//il.Emit(OpCodes.Div, p1);
|
||||
break;
|
||||
case LSO_Enums.Operation_Table.EQ:
|
||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Ceq);");
|
||||
bp1 = br_read(1)[0];
|
||||
Common.SendToDebug("Param1: " + bp1);
|
||||
il.Emit(OpCodes.Ceq);
|
||||
//il.Emit(OpCodes.Ceq, p1);
|
||||
break;
|
||||
case LSO_Enums.Operation_Table.NEQ:
|
||||
case LSO_Enums.Operation_Table.LEQ:
|
||||
case LSO_Enums.Operation_Table.GEQ:
|
||||
case LSO_Enums.Operation_Table.LESS:
|
||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Clt_Un);");
|
||||
bp1 = br_read(1)[0];
|
||||
Common.SendToDebug("Param1: " + bp1);
|
||||
il.Emit(OpCodes.Clt_Un);
|
||||
//il.Emit(OpCodes.Clt, p1);
|
||||
break;
|
||||
case LSO_Enums.Operation_Table.GREATER:
|
||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Cgt_Un);");
|
||||
bp1 = br_read(1)[0];
|
||||
Common.SendToDebug("Param1: " + bp1);
|
||||
il.Emit(OpCodes.Cgt_Un);
|
||||
//il.Emit(OpCodes.Cgt, p1);
|
||||
break;
|
||||
case LSO_Enums.Operation_Table.MOD:
|
||||
case LSO_Enums.Operation_Table.BOOLOR:
|
||||
bp1 = br_read(1)[0];
|
||||
Common.SendToDebug("Param1: " + bp1);
|
||||
break;
|
||||
// LONG
|
||||
case LSO_Enums.Operation_Table.JUMP:
|
||||
Common.SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
break;
|
||||
// BYTE, LONG
|
||||
case LSO_Enums.Operation_Table.JUMPIF:
|
||||
case LSO_Enums.Operation_Table.JUMPNIF:
|
||||
Common.SendToDebug("Param1: " + br_read(1)[0]);
|
||||
Common.SendToDebug("Param2: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
break;
|
||||
// LONG
|
||||
case LSO_Enums.Operation_Table.STATE:
|
||||
bp1 = br_read(1)[0];
|
||||
//il.Emit(OpCodes.Ld); // Load local variable 0 onto stack
|
||||
//il.Emit(OpCodes.Ldc_I4, 0); // Push index position
|
||||
//il.Emit(OpCodes.Ldstr, EventList[p1]); // Push value
|
||||
//il.Emit(OpCodes.Stelem_Ref); // Perform array[index] = value
|
||||
break;
|
||||
case LSO_Enums.Operation_Table.CALL:
|
||||
Common.SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
break;
|
||||
// BYTE
|
||||
case LSO_Enums.Operation_Table.CAST:
|
||||
bp1 = br_read(1)[0];
|
||||
Common.SendToDebug("Instruction " + idesc + ": Cast to type: " + ((LSO_Enums.OpCode_Cast_TypeDefs)bp1));
|
||||
Common.SendToDebug("Param1: " + bp1);
|
||||
switch ((LSO_Enums.OpCode_Cast_TypeDefs)bp1)
|
||||
{
|
||||
case LSO_Enums.OpCode_Cast_TypeDefs.String:
|
||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Calli, typeof(System.Convert).GetMethod(\"ToString\", new Type[] { typeof(object) }));");
|
||||
//il.Emit(OpCodes.Box, typeof (UInt32));
|
||||
il.Emit(OpCodes.Calli, typeof(Common).GetMethod
|
||||
("Cast_ToString", new Type[] { typeof(object) }));
|
||||
|
||||
//il.Emit(OpCodes.Box, typeof(System.UInt32) );
|
||||
//il.Emit(OpCodes.Box, typeof(string));
|
||||
|
||||
//il.Emit(OpCodes.Conv_R8);
|
||||
//il.Emit(OpCodes.Call, typeof(System.Convert).GetMethod
|
||||
// ("ToString", new Type[] { typeof(float) }));
|
||||
|
||||
break;
|
||||
default:
|
||||
Common.SendToDebug("Instruction " + idesc + ": Unknown cast type!");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
// LONG
|
||||
case LSO_Enums.Operation_Table.STACKTOS:
|
||||
case LSO_Enums.Operation_Table.STACKTOL:
|
||||
Common.SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||
break;
|
||||
// BYTE
|
||||
case LSO_Enums.Operation_Table.PRINT:
|
||||
case LSO_Enums.Operation_Table.CALLLIB:
|
||||
Common.SendToDebug("Param1: " + br_read(1)[0]);
|
||||
break;
|
||||
// SHORT
|
||||
case LSO_Enums.Operation_Table.CALLLIB_TWO_BYTE:
|
||||
// TODO: What is size of short?
|
||||
UInt16 U16p1 = BitConverter.ToUInt16(br_read(2), 0);
|
||||
Common.SendToDebug("Instruction " + idesc + ": Builtin Command: " + ((LSO_Enums.BuiltIn_Functions)U16p1).ToString());
|
||||
Common.SendToDebug("Param1: " + U16p1);
|
||||
switch ((LSO_Enums.BuiltIn_Functions)U16p1)
|
||||
{
|
||||
case LSO_Enums.BuiltIn_Functions.llSay:
|
||||
Common.SendToDebug("Instruction " + idesc + " " + ((LSO_Enums.BuiltIn_Functions)U16p1).ToString()
|
||||
+ ": Mapped to internal function");
|
||||
|
||||
//il.Emit(OpCodes.Ldstr, "INTERNAL COMMAND: llSay({0}, \"{1}\"");
|
||||
//il.Emit(OpCodes.Call, typeof(IL_Helper).GetMethod("ReverseFormatString",
|
||||
// new Type[] { typeof(string), typeof(UInt32), typeof(string) }
|
||||
//));
|
||||
|
||||
|
||||
//il.Emit(OpCodes.Pop);
|
||||
//il.Emit(OpCodes.Call,
|
||||
// typeof(Console).GetMethod("WriteLine",
|
||||
// new Type[] { typeof(string) }
|
||||
//));
|
||||
|
||||
|
||||
il.Emit(OpCodes.Call,
|
||||
typeof(Common).GetMethod("SendToLog",
|
||||
new Type[] { typeof(string) }
|
||||
));
|
||||
|
||||
|
||||
|
||||
//il.Emit(OpCodes.Pop);
|
||||
|
||||
//il.Emit(OpCodes.Ldind_I2, 0);
|
||||
|
||||
//il.Emit(OpCodes.Call, typeof(string).GetMethod("Format", new Type[] { typeof(string), typeof(object) }));
|
||||
//il.EmitCalli(OpCodes.Calli,
|
||||
//il.Emit(OpCodes.Call, typeof().GetMethod
|
||||
// ("llSay", new Type[] { typeof(UInt32), typeof(string) }));
|
||||
break;
|
||||
default:
|
||||
Common.SendToDebug("Instruction " + idesc + ": " + ((LSO_Enums.BuiltIn_Functions)U16p1).ToString() + ": INTERNAL COMMAND NOT IMPLEMENTED");
|
||||
break;
|
||||
}
|
||||
|
||||
//Common.SendToDebug("Instruction " + idesc + ": DEBUG: Faking return code:");
|
||||
//Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Ldc_I4, 0);");
|
||||
//il.Emit(OpCodes.Ldc_I4, 0);
|
||||
break;
|
||||
|
||||
// RETURN
|
||||
case LSO_Enums.Operation_Table.RETURN:
|
||||
|
||||
Common.SendToDebug("Last OPCODE was return command. Code chunk execution complete.");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using OpenSim.Region.Scripting;
|
||||
using OpenSim.Region.Scripting.LSL;
|
||||
|
||||
namespace OpenSim.Region.Scripting.LSL
|
||||
{
|
||||
class LSLScript : IScript
|
||||
{
|
||||
ScriptInfo scriptInfo;
|
||||
LSL.Engine lindenScriptEngine;
|
||||
|
||||
public LSLScript(string filename, libsecondlife.LLUUID taskObject)
|
||||
{
|
||||
scriptInfo.CreateTaskAPI(taskObject);
|
||||
|
||||
lindenScriptEngine = new Engine();
|
||||
lindenScriptEngine.Start(filename);
|
||||
}
|
||||
|
||||
public void Initialise(ScriptInfo info)
|
||||
{
|
||||
scriptInfo = info;
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return "LSL Script";
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using OpenSim.Region.Scripting;
|
||||
using OpenSim.Region.Scripting.LSL;
|
||||
|
||||
namespace OpenSim.Region.Scripting.LSL
|
||||
{
|
||||
class LSLScript : IScript
|
||||
{
|
||||
ScriptInfo scriptInfo;
|
||||
LSL.Engine lindenScriptEngine;
|
||||
|
||||
public LSLScript(string filename, libsecondlife.LLUUID taskObject)
|
||||
{
|
||||
scriptInfo.CreateTaskAPI(taskObject);
|
||||
|
||||
lindenScriptEngine = new Engine();
|
||||
lindenScriptEngine.Start(filename);
|
||||
}
|
||||
|
||||
public void Initialise(ScriptInfo info)
|
||||
{
|
||||
scriptInfo = info;
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return "LSL Script";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using OpenSim.Region.Scripting;
|
||||
using OpenSim.Region.Scripting.LSL;
|
||||
|
||||
namespace OpenSim.Region.Scripting
|
||||
{
|
||||
public class LSLEngine : IScriptCompiler
|
||||
{
|
||||
public string FileExt()
|
||||
{
|
||||
return ".lso";
|
||||
}
|
||||
|
||||
public Dictionary<string, IScript> compile(string filename)
|
||||
{
|
||||
LSLScript script = new LSLScript(filename, libsecondlife.LLUUID.Zero);
|
||||
Dictionary<string, IScript> returns = new Dictionary<string, IScript>();
|
||||
|
||||
returns.Add(filename, script);
|
||||
|
||||
return returns;
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using OpenSim.Region.Scripting;
|
||||
using OpenSim.Region.Scripting.LSL;
|
||||
|
||||
namespace OpenSim.Region.Scripting
|
||||
{
|
||||
public class LSLEngine : IScriptCompiler
|
||||
{
|
||||
public string FileExt()
|
||||
{
|
||||
return ".lso";
|
||||
}
|
||||
|
||||
public Dictionary<string, IScript> compile(string filename)
|
||||
{
|
||||
LSLScript script = new LSLScript(filename, libsecondlife.LLUUID.Zero);
|
||||
Dictionary<string, IScript> returns = new Dictionary<string, IScript>();
|
||||
|
||||
returns.Add(filename, script);
|
||||
|
||||
return returns;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user