diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs | 9 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | 76 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs | 11 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands_Interface.cs (renamed from OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/Server_API/LSL_BuiltIn_Commands_Interface.cs) | 56 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands_TestImplementation.cs (renamed from OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/Server_API/LSL_BuiltIn_Commands_TestImplementation.cs) | 58 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs | 2 | ||||
-rw-r--r-- | prebuild.xml | 9 |
8 files changed, 101 insertions, 121 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs index 33be6ec..6eadb0e 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs | |||
@@ -16,16 +16,21 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
16 | { | 16 | { |
17 | 17 | ||
18 | 18 | ||
19 | string OutFile = Path.GetFileNameWithoutExtension(LSOFileName); | 19 | // Output assembly name |
20 | string OutFile = Path.GetFileNameWithoutExtension(LSOFileName) + ".dll"; | ||
20 | 21 | ||
21 | // TODO: Add error handling | 22 | // TODO: Add error handling |
22 | string CS_Code = LSL_Converter.Convert(File.ReadAllText(LSOFileName)); | 23 | string CS_Code = LSL_Converter.Convert(File.ReadAllText(LSOFileName)); |
23 | 24 | ||
25 | // Do actual compile | ||
24 | System.CodeDom.Compiler.CompilerParameters parameters = new CompilerParameters(); | 26 | System.CodeDom.Compiler.CompilerParameters parameters = new CompilerParameters(); |
25 | parameters.GenerateExecutable = true; | 27 | parameters.IncludeDebugInformation = true; |
28 | parameters.ReferencedAssemblies.Add("OpenSim.Region.Environment"); | ||
29 | parameters.GenerateExecutable = false; | ||
26 | parameters.OutputAssembly = OutFile; | 30 | parameters.OutputAssembly = OutFile; |
27 | CompilerResults results = codeProvider.CompileAssemblyFromSource(parameters, CS_Code); | 31 | CompilerResults results = codeProvider.CompileAssemblyFromSource(parameters, CS_Code); |
28 | 32 | ||
33 | // Go through errors | ||
29 | // TODO: Return errors to user somehow | 34 | // TODO: Return errors to user somehow |
30 | if (results.Errors.Count > 0) | 35 | if (results.Errors.Count > 0) |
31 | { | 36 | { |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs index f058566..d9042b5 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | |||
@@ -18,11 +18,12 @@ namespace LSL2CS.Converter | |||
18 | DataTypes.Add("float", "float"); | 18 | DataTypes.Add("float", "float"); |
19 | DataTypes.Add("string", "string"); | 19 | DataTypes.Add("string", "string"); |
20 | DataTypes.Add("key", "string"); | 20 | DataTypes.Add("key", "string"); |
21 | DataTypes.Add("vector", "vector"); | 21 | DataTypes.Add("vector", "Axiom.Math.Vector3"); |
22 | DataTypes.Add("rotation", "rotation"); | 22 | DataTypes.Add("rotation", "Axiom.Math.Quaternion"); |
23 | DataTypes.Add("list", "list"); | 23 | DataTypes.Add("list", "list"); |
24 | DataTypes.Add("null", "null"); | 24 | DataTypes.Add("null", "null"); |
25 | } | 25 | } |
26 | |||
26 | 27 | ||
27 | 28 | ||
28 | 29 | ||
@@ -34,37 +35,14 @@ namespace LSL2CS.Converter | |||
34 | // Prepare script for processing | 35 | // Prepare script for processing |
35 | // | 36 | // |
36 | 37 | ||
37 | // Here we will remove those linebreaks that are allowed in so many languages. | 38 | // Clean up linebreaks |
38 | // One hard-ass regex should do the job. | ||
39 | |||
40 | // Then we will add some linebreaks. | ||
41 | Script = Regex.Replace(Script, @"\r\n", "\n"); | 39 | Script = Regex.Replace(Script, @"\r\n", "\n"); |
42 | Script = Regex.Replace(Script, @"\n", "\r\n"); | 40 | Script = Regex.Replace(Script, @"\n", "\r\n"); |
43 | //Script = Regex.Replace(Script, @"\n\s*{", @"{"); | ||
44 | //Script = Regex.Replace(Script, @"[\r\n]", @""); | ||
45 | |||
46 | // Then we remove unwanted linebreaks | ||
47 | |||
48 | |||
49 | //// | ||
50 | //// Split up script to process line by line | ||
51 | //// | ||
52 | //int count = 0; | ||
53 | //string line; | ||
54 | //Regex r = new Regex("\r?\n", RegexOptions.Multiline | RegexOptions.Compiled); | ||
55 | //string[] lines = r.Split(Script); | ||
56 | |||
57 | //for (int i = 0; i < lines.Length; i++) | ||
58 | //{ | ||
59 | // // Remove space in front and back | ||
60 | // line = lines[i].Trim(); | ||
61 | // count++; | ||
62 | // Return += count + ". " + translate(line) + "\r\n"; | ||
63 | //} | ||
64 | 41 | ||
65 | 42 | ||
66 | // QUOTE REPLACEMENT | 43 | // QUOTE REPLACEMENT |
67 | //char[] SA = Script.ToCharArray(); | 44 | // temporarily replace quotes so we can work our magic on the script without |
45 | // always considering if we are inside our outside ""'s | ||
68 | string _Script = ""; | 46 | string _Script = ""; |
69 | string C; | 47 | string C; |
70 | bool in_quote = false; | 48 | bool in_quote = false; |
@@ -129,8 +107,10 @@ namespace LSL2CS.Converter | |||
129 | 107 | ||
130 | 108 | ||
131 | 109 | ||
132 | 110 | // | |
133 | // PROCESS STATES | 111 | // PROCESS STATES |
112 | // Remove state definitions and add state names to start of each event within state | ||
113 | // | ||
134 | int ilevel = 0; | 114 | int ilevel = 0; |
135 | int lastlevel = 0; | 115 | int lastlevel = 0; |
136 | string ret = ""; | 116 | string ret = ""; |
@@ -190,13 +170,6 @@ namespace LSL2CS.Converter | |||
190 | current_statename = ""; | 170 | current_statename = ""; |
191 | } | 171 | } |
192 | 172 | ||
193 | // if we moved from level 0 to level 1 don't add last word + { | ||
194 | // if we moved from level 1 to level 0 don't add last } | ||
195 | // if level > 0 cache all data so we can run regex on it when going to level 0 | ||
196 | |||
197 | |||
198 | |||
199 | |||
200 | break; | 173 | break; |
201 | } | 174 | } |
202 | lastlevel = ilevel; | 175 | lastlevel = ilevel; |
@@ -209,17 +182,23 @@ namespace LSL2CS.Converter | |||
209 | 182 | ||
210 | 183 | ||
211 | 184 | ||
212 | // Replace CAST - (integer) with (int) | 185 | foreach (string key in DataTypes.Keys) |
213 | Script = Regex.Replace(Script, @"\(integer\)", @"(int)", RegexOptions.Compiled | RegexOptions.Multiline); | 186 | { |
214 | // Replace return types and function variables - integer a() and f(integer a, integer a) | 187 | string val; |
215 | Script = Regex.Replace(Script, @"(^|;|}|[\(,])(\s*int)eger(\s*)", @"$1$2$3", RegexOptions.Compiled | RegexOptions.Multiline); | 188 | DataTypes.TryGetValue(key, out val); |
189 | |||
190 | // Replace CAST - (integer) with (int) | ||
191 | Script = Regex.Replace(Script, @"\(" + key + @"\)", @"(" + val + ")", RegexOptions.Compiled | RegexOptions.Multiline); | ||
192 | // Replace return types and function variables - integer a() and f(integer a, integer a) | ||
193 | Script = Regex.Replace(Script, @"(^|;|}|[\(,])(\s*)" + key + @"(\s*)", @"$1$2" + val + "$3", RegexOptions.Compiled | RegexOptions.Multiline); | ||
194 | } | ||
216 | 195 | ||
217 | // Add "void" in front of functions that needs it | 196 | // Add "void" in front of functions that needs it |
218 | Script = Regex.Replace(Script, @"^(\s*)((?!if|switch|for)[a-zA-Z0-9_]*\s*\([^\)]*\)[^;]*\{)", @"$1void $2", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); | 197 | Script = Regex.Replace(Script, @"^(\s*)((?!if|switch|for)[a-zA-Z0-9_]*\s*\([^\)]*\)[^;]*\{)", @"$1void $2", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); |
219 | 198 | ||
220 | // Replace <x,y,z> and <x,y,z,r> | 199 | // Replace <x,y,z> and <x,y,z,r> |
221 | Script = Regex.Replace(Script, @"<([^,>]*,[^,>]*,[^,>]*,[^,>]*)>", @"Rotation.Parse($1)", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); | 200 | Script = Regex.Replace(Script, @"<([^,>]*,[^,>]*,[^,>]*,[^,>]*)>", @"new Axiom.Math.Quaternion($1)", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); |
222 | Script = Regex.Replace(Script, @"<([^,>]*,[^,>]*,[^,>]*)>", @"Vector.Parse($1)", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); | 201 | Script = Regex.Replace(Script, @"<([^,>]*,[^,>]*,[^,>]*)>", @"new Axiom.Math.Vector3($1)", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); |
223 | 202 | ||
224 | // Replace List []'s | 203 | // Replace List []'s |
225 | Script = Regex.Replace(Script, @"\[([^\]]*)\]", @"List.Parse($1)", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); | 204 | Script = Regex.Replace(Script, @"\[([^\]]*)\]", @"List.Parse($1)", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); |
@@ -239,6 +218,7 @@ namespace LSL2CS.Converter | |||
239 | } | 218 | } |
240 | 219 | ||
241 | 220 | ||
221 | // Add namespace, class name and inheritance | ||
242 | Return = "namespace SecondLife {" + Environment.NewLine; | 222 | Return = "namespace SecondLife {" + Environment.NewLine; |
243 | Return += "public class Script : LSL_BaseClass {" + Environment.NewLine; | 223 | Return += "public class Script : LSL_BaseClass {" + Environment.NewLine; |
244 | Return += Script; | 224 | Return += Script; |
@@ -246,18 +226,6 @@ namespace LSL2CS.Converter | |||
246 | 226 | ||
247 | return Return; | 227 | return Return; |
248 | } | 228 | } |
249 | //private string GetWord(char[] SA, int p) | ||
250 | //{ | ||
251 | // string ret = ""; | ||
252 | // for (int i = p; p < SA.Length; i++) | ||
253 | // { | ||
254 | // if (!rnw.IsMatch(SA[i].ToString())) | ||
255 | // break; | ||
256 | // ret += SA[i]; | ||
257 | // } | ||
258 | // return ret; | ||
259 | //} | ||
260 | |||
261 | 229 | ||
262 | 230 | ||
263 | } | 231 | } |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs index 03d8ba5..a065683 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs | |||
@@ -1,10 +1,21 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using System.Text; | 3 | using System.Text; |
4 | using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler; | ||
4 | 5 | ||
5 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | 6 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL |
6 | { | 7 | { |
7 | class LSL_BaseClass | 8 | class LSL_BaseClass |
8 | { | 9 | { |
10 | public UInt32 State = 0; | ||
11 | public LSL_BuiltIn_Commands_Interface LSL_Builtins; | ||
12 | |||
13 | public void Start(LSL_BuiltIn_Commands_Interface LSLBuiltins) | ||
14 | { | ||
15 | LSL_Builtins = LSLBuiltins; | ||
16 | Common.SendToLog("OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.LSL_BaseClass.Start() called"); | ||
17 | |||
18 | return; | ||
19 | } | ||
9 | } | 20 | } |
10 | } | 21 | } |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass.cs index 99904d4..0fbb2cf 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass.cs | |||
@@ -2,6 +2,7 @@ using System; | |||
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using System.Text; | 3 | using System.Text; |
4 | using System.IO; | 4 | using System.IO; |
5 | using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler; | ||
5 | 6 | ||
6 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO | 7 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO |
7 | { | 8 | { |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/Server_API/LSL_BuiltIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands_Interface.cs index 8a5d4b6..d484a05 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/Server_API/LSL_BuiltIn_Commands_Interface.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands_Interface.cs | |||
@@ -30,7 +30,7 @@ using System; | |||
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Text; | 31 | using System.Text; |
32 | 32 | ||
33 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO | 33 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler |
34 | { | 34 | { |
35 | public interface LSL_BuiltIn_Commands_Interface | 35 | public interface LSL_BuiltIn_Commands_Interface |
36 | { | 36 | { |
@@ -46,54 +46,54 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO | |||
46 | UInt32 llFloor(float f); | 46 | UInt32 llFloor(float f); |
47 | UInt32 llCeil(float f); | 47 | UInt32 llCeil(float f); |
48 | UInt32 llRound(float f); | 48 | UInt32 llRound(float f); |
49 | float llVecMag(LSO_Enums.Vector v); | 49 | float llVecMag(Axiom.Math.Vector3 v); |
50 | LSO_Enums.Vector llVecNorm(LSO_Enums.Vector v); | 50 | Axiom.Math.Vector3 llVecNorm(Axiom.Math.Vector3 v); |
51 | float llVecDist(LSO_Enums.Vector a, LSO_Enums.Vector b); | 51 | float llVecDist(Axiom.Math.Vector3 a, Axiom.Math.Vector3 b); |
52 | LSO_Enums.Vector llRot2Euler(LSO_Enums.Rotation r); | 52 | Axiom.Math.Vector3 llRot2Euler(Axiom.Math.Quaternion r); |
53 | LSO_Enums.Rotation llEuler2Rot(LSO_Enums.Vector v); | 53 | Axiom.Math.Quaternion llEuler2Rot(Axiom.Math.Vector3 v); |
54 | LSO_Enums.Rotation llAxes2Rot(LSO_Enums.Vector fwd, LSO_Enums.Vector left, LSO_Enums.Vector up); | 54 | Axiom.Math.Quaternion llAxes2Rot(Axiom.Math.Vector3 fwd, Axiom.Math.Vector3 left, Axiom.Math.Vector3 up); |
55 | LSO_Enums.Vector llRot2Fwd(LSO_Enums.Rotation r); | 55 | Axiom.Math.Vector3 llRot2Fwd(Axiom.Math.Quaternion r); |
56 | LSO_Enums.Vector llRot2Left(LSO_Enums.Rotation r); | 56 | Axiom.Math.Vector3 llRot2Left(Axiom.Math.Quaternion r); |
57 | LSO_Enums.Vector llRot2Up(LSO_Enums.Rotation r); | 57 | Axiom.Math.Vector3 llRot2Up(Axiom.Math.Quaternion r); |
58 | LSO_Enums.Rotation llRotBetween(LSO_Enums.Vector start, LSO_Enums.Vector end); | 58 | Axiom.Math.Quaternion llRotBetween(Axiom.Math.Vector3 start, Axiom.Math.Vector3 end); |
59 | void llWhisper(UInt16 channelID, string text); | 59 | void llWhisper(UInt16 channelID, string text); |
60 | //void llSay(UInt32 channelID, string text); | 60 | //void llSay(UInt32 channelID, string text); |
61 | void llSay(object channelID, object text); | 61 | void llSay(object channelID, object text); |
62 | void llShout(UInt16 channelID, string text); | 62 | void llShout(UInt16 channelID, string text); |
63 | UInt32 llListen(UInt16 channelID, string name, LSO_Enums.Key ID, string msg); | 63 | UInt32 llListen(UInt16 channelID, string name, string ID, string msg); |
64 | void llListenControl(UInt32 number, UInt32 active); | 64 | void llListenControl(UInt32 number, UInt32 active); |
65 | void llListenRemove(UInt32 number); | 65 | void llListenRemove(UInt32 number); |
66 | void llSensor(string name, LSO_Enums.Key id, UInt32 type, float range, float arc); | 66 | void llSensor(string name, string id, UInt32 type, float range, float arc); |
67 | void llSensorRepeat(string name, LSO_Enums.Key id, UInt32 type, float range, float arc, float rate); | 67 | void llSensorRepeat(string name, string id, UInt32 type, float range, float arc, float rate); |
68 | void llSensorRemove(); | 68 | void llSensorRemove(); |
69 | string llDetectedName(UInt32 number); | 69 | string llDetectedName(UInt32 number); |
70 | LSO_Enums.Key llDetectedKey(UInt32 number); | 70 | string llDetectedKey(UInt32 number); |
71 | LSO_Enums.Key llDetectedOwner(UInt32 number); | 71 | string llDetectedOwner(UInt32 number); |
72 | UInt32 llDetectedType(UInt32 number); | 72 | UInt32 llDetectedType(UInt32 number); |
73 | LSO_Enums.Vector llDetectedPos(UInt32 number); | 73 | Axiom.Math.Vector3 llDetectedPos(UInt32 number); |
74 | LSO_Enums.Vector llDetectedVel(UInt32 number); | 74 | Axiom.Math.Vector3 llDetectedVel(UInt32 number); |
75 | LSO_Enums.Vector llDetectedGrab(UInt32 number); | 75 | Axiom.Math.Vector3 llDetectedGrab(UInt32 number); |
76 | LSO_Enums.Rotation llDetectedRot(UInt32 number); | 76 | Axiom.Math.Quaternion llDetectedRot(UInt32 number); |
77 | UInt32 llDetectedGroup(UInt32 number); | 77 | UInt32 llDetectedGroup(UInt32 number); |
78 | UInt32 llDetectedLinkNumber(UInt32 number); | 78 | UInt32 llDetectedLinkNumber(UInt32 number); |
79 | void llDie(); | 79 | void llDie(); |
80 | float llGround(LSO_Enums.Vector offset); | 80 | float llGround(Axiom.Math.Vector3 offset); |
81 | float llCloud(LSO_Enums.Vector offset); | 81 | float llCloud(Axiom.Math.Vector3 offset); |
82 | LSO_Enums.Vector llWind(LSO_Enums.Vector offset); | 82 | Axiom.Math.Vector3 llWind(Axiom.Math.Vector3 offset); |
83 | void llSetStatus(UInt32 status, UInt32 value); | 83 | void llSetStatus(UInt32 status, UInt32 value); |
84 | UInt32 llGetStatus(UInt32 status); | 84 | UInt32 llGetStatus(UInt32 status); |
85 | void llSetScale(LSO_Enums.Vector scale); | 85 | void llSetScale(Axiom.Math.Vector3 scale); |
86 | LSO_Enums.Vector llGetScale(); | 86 | Axiom.Math.Vector3 llGetScale(); |
87 | void llSetColor(LSO_Enums.Vector color, UInt32 face); | 87 | void llSetColor(Axiom.Math.Vector3 color, UInt32 face); |
88 | float llGetAlpha(UInt32 face); | 88 | float llGetAlpha(UInt32 face); |
89 | void llSetAlpha(float alpha, UInt32 face); | 89 | void llSetAlpha(float alpha, UInt32 face); |
90 | LSO_Enums.Vector llGetColor(UInt32 face); | 90 | Axiom.Math.Vector3 llGetColor(UInt32 face); |
91 | void llSetTexture(string texture, UInt32 face); | 91 | void llSetTexture(string texture, UInt32 face); |
92 | void llScaleTexture(float u, float v, UInt32 face); | 92 | void llScaleTexture(float u, float v, UInt32 face); |
93 | void llOffsetTexture(float u, float v, UInt32 face); | 93 | void llOffsetTexture(float u, float v, UInt32 face); |
94 | void llRotateTexture(float rotation, UInt32 face); | 94 | void llRotateTexture(float rotation, UInt32 face); |
95 | string llGetTexture(UInt32 face); | 95 | string llGetTexture(UInt32 face); |
96 | void llSetPos(LSO_Enums.Vector pos); | 96 | void llSetPos(Axiom.Math.Vector3 pos); |
97 | 97 | ||
98 | void llGetPos(); | 98 | void llGetPos(); |
99 | void llGetLocalPos(); | 99 | void llGetLocalPos(); |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/Server_API/LSL_BuiltIn_Commands_TestImplementation.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands_TestImplementation.cs index 38adf9f..f107993 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/Server_API/LSL_BuiltIn_Commands_TestImplementation.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands_TestImplementation.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | 2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -30,7 +30,7 @@ using System; | |||
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Text; | 31 | using System.Text; |
32 | 32 | ||
33 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO | 33 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler |
34 | { | 34 | { |
35 | public class LSL_BuiltIn_Commands_TestImplementation : LSL_BuiltIn_Commands_Interface | 35 | public class LSL_BuiltIn_Commands_TestImplementation : LSL_BuiltIn_Commands_Interface |
36 | { | 36 | { |
@@ -52,16 +52,16 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO | |||
52 | public UInt32 llFloor(float f) { return 0; } | 52 | public UInt32 llFloor(float f) { return 0; } |
53 | public UInt32 llCeil(float f) { return 0; } | 53 | public UInt32 llCeil(float f) { return 0; } |
54 | public UInt32 llRound(float f) { return 0; } | 54 | public UInt32 llRound(float f) { return 0; } |
55 | public float llVecMag(LSO_Enums.Vector v) { return 0; } | 55 | public float llVecMag(Axiom.Math.Vector3 v) { return 0; } |
56 | public LSO_Enums.Vector llVecNorm(LSO_Enums.Vector v) { return new LSO_Enums.Vector(); } | 56 | public Axiom.Math.Vector3 llVecNorm(Axiom.Math.Vector3 v) { return new Axiom.Math.Vector3(); } |
57 | public float llVecDist(LSO_Enums.Vector a, LSO_Enums.Vector b) { return 0; } | 57 | public float llVecDist(Axiom.Math.Vector3 a, Axiom.Math.Vector3 b) { return 0; } |
58 | public LSO_Enums.Vector llRot2Euler(LSO_Enums.Rotation r) { return new LSO_Enums.Vector(); } | 58 | public Axiom.Math.Vector3 llRot2Euler(Axiom.Math.Quaternion r) { return new Axiom.Math.Vector3(); } |
59 | public LSO_Enums.Rotation llEuler2Rot(LSO_Enums.Vector v) { return new LSO_Enums.Rotation(); } | 59 | public Axiom.Math.Quaternion llEuler2Rot(Axiom.Math.Vector3 v) { return new Axiom.Math.Quaternion(); } |
60 | public LSO_Enums.Rotation llAxes2Rot(LSO_Enums.Vector fwd, LSO_Enums.Vector left, LSO_Enums.Vector up) { return new LSO_Enums.Rotation(); } | 60 | public Axiom.Math.Quaternion llAxes2Rot(Axiom.Math.Vector3 fwd, Axiom.Math.Vector3 left, Axiom.Math.Vector3 up) { return new Axiom.Math.Quaternion(); } |
61 | public LSO_Enums.Vector llRot2Fwd(LSO_Enums.Rotation r) { return new LSO_Enums.Vector(); } | 61 | public Axiom.Math.Vector3 llRot2Fwd(Axiom.Math.Quaternion r) { return new Axiom.Math.Vector3(); } |
62 | public LSO_Enums.Vector llRot2Left(LSO_Enums.Rotation r) { return new LSO_Enums.Vector(); } | 62 | public Axiom.Math.Vector3 llRot2Left(Axiom.Math.Quaternion r) { return new Axiom.Math.Vector3(); } |
63 | public LSO_Enums.Vector llRot2Up(LSO_Enums.Rotation r) { return new LSO_Enums.Vector(); } | 63 | public Axiom.Math.Vector3 llRot2Up(Axiom.Math.Quaternion r) { return new Axiom.Math.Vector3(); } |
64 | public LSO_Enums.Rotation llRotBetween(LSO_Enums.Vector start, LSO_Enums.Vector end) { return new LSO_Enums.Rotation(); } | 64 | public Axiom.Math.Quaternion llRotBetween(Axiom.Math.Vector3 start, Axiom.Math.Vector3 end) { return new Axiom.Math.Quaternion(); } |
65 | public void llWhisper(UInt16 channelID, string text) | 65 | public void llWhisper(UInt16 channelID, string text) |
66 | { | 66 | { |
67 | Common.SendToDebug("INTERNAL FUNCTION llWhisper(" + channelID + ", \"" + text + "\");"); | 67 | Common.SendToDebug("INTERNAL FUNCTION llWhisper(" + channelID + ", \"" + text + "\");"); |
@@ -75,40 +75,40 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO | |||
75 | Common.SendToLog("llSay Channel " + (UInt32)channelID + ", Text: \"" + (string)text + "\""); | 75 | Common.SendToLog("llSay Channel " + (UInt32)channelID + ", Text: \"" + (string)text + "\""); |
76 | } | 76 | } |
77 | public void llShout(UInt16 channelID, string text) { return; } | 77 | public void llShout(UInt16 channelID, string text) { return; } |
78 | public UInt32 llListen(UInt16 channelID, string name, LSO_Enums.Key ID, string msg) { return 0; } | 78 | public UInt32 llListen(UInt16 channelID, string name, string ID, string msg) { return 0; } |
79 | public void llListenControl(UInt32 number, UInt32 active) { return; } | 79 | public void llListenControl(UInt32 number, UInt32 active) { return; } |
80 | public void llListenRemove(UInt32 number) { return; } | 80 | public void llListenRemove(UInt32 number) { return; } |
81 | public void llSensor(string name, LSO_Enums.Key id, UInt32 type, float range, float arc) { return; } | 81 | public void llSensor(string name, string id, UInt32 type, float range, float arc) { return; } |
82 | public void llSensorRepeat(string name, LSO_Enums.Key id, UInt32 type, float range, float arc, float rate) { return; } | 82 | public void llSensorRepeat(string name, string id, UInt32 type, float range, float arc, float rate) { return; } |
83 | public void llSensorRemove() { return; } | 83 | public void llSensorRemove() { return; } |
84 | public string llDetectedName(UInt32 number) { return ""; } | 84 | public string llDetectedName(UInt32 number) { return ""; } |
85 | public LSO_Enums.Key llDetectedKey(UInt32 number) { return new LSO_Enums.Key(); } | 85 | public string llDetectedKey(UInt32 number) { return ""; } |
86 | public LSO_Enums.Key llDetectedOwner(UInt32 number) { return new LSO_Enums.Key(); } | 86 | public string llDetectedOwner(UInt32 number) { return ""; } |
87 | public UInt32 llDetectedType(UInt32 number) { return 0; } | 87 | public UInt32 llDetectedType(UInt32 number) { return 0; } |
88 | public LSO_Enums.Vector llDetectedPos(UInt32 number) { return new LSO_Enums.Vector(); } | 88 | public Axiom.Math.Vector3 llDetectedPos(UInt32 number) { return new Axiom.Math.Vector3(); } |
89 | public LSO_Enums.Vector llDetectedVel(UInt32 number) { return new LSO_Enums.Vector(); } | 89 | public Axiom.Math.Vector3 llDetectedVel(UInt32 number) { return new Axiom.Math.Vector3(); } |
90 | public LSO_Enums.Vector llDetectedGrab(UInt32 number) { return new LSO_Enums.Vector(); } | 90 | public Axiom.Math.Vector3 llDetectedGrab(UInt32 number) { return new Axiom.Math.Vector3(); } |
91 | public LSO_Enums.Rotation llDetectedRot(UInt32 number) { return new LSO_Enums.Rotation(); } | 91 | public Axiom.Math.Quaternion llDetectedRot(UInt32 number) { return new Axiom.Math.Quaternion(); } |
92 | public UInt32 llDetectedGroup(UInt32 number) { return 0; } | 92 | public UInt32 llDetectedGroup(UInt32 number) { return 0; } |
93 | public UInt32 llDetectedLinkNumber(UInt32 number) { return 0; } | 93 | public UInt32 llDetectedLinkNumber(UInt32 number) { return 0; } |
94 | public void llDie() { return; } | 94 | public void llDie() { return; } |
95 | public float llGround(LSO_Enums.Vector offset) { return 0; } | 95 | public float llGround(Axiom.Math.Vector3 offset) { return 0; } |
96 | public float llCloud(LSO_Enums.Vector offset) { return 0; } | 96 | public float llCloud(Axiom.Math.Vector3 offset) { return 0; } |
97 | public LSO_Enums.Vector llWind(LSO_Enums.Vector offset) { return new LSO_Enums.Vector(); } | 97 | public Axiom.Math.Vector3 llWind(Axiom.Math.Vector3 offset) { return new Axiom.Math.Vector3(); } |
98 | public void llSetStatus(UInt32 status, UInt32 value) { return; } | 98 | public void llSetStatus(UInt32 status, UInt32 value) { return; } |
99 | public UInt32 llGetStatus(UInt32 status) { return 0; } | 99 | public UInt32 llGetStatus(UInt32 status) { return 0; } |
100 | public void llSetScale(LSO_Enums.Vector scale) { return; } | 100 | public void llSetScale(Axiom.Math.Vector3 scale) { return; } |
101 | public LSO_Enums.Vector llGetScale() { return new LSO_Enums.Vector(); } | 101 | public Axiom.Math.Vector3 llGetScale() { return new Axiom.Math.Vector3(); } |
102 | public void llSetColor(LSO_Enums.Vector color, UInt32 face) { return; } | 102 | public void llSetColor(Axiom.Math.Vector3 color, UInt32 face) { return; } |
103 | public float llGetAlpha(UInt32 face) { return 0; } | 103 | public float llGetAlpha(UInt32 face) { return 0; } |
104 | public void llSetAlpha(float alpha, UInt32 face) { return; } | 104 | public void llSetAlpha(float alpha, UInt32 face) { return; } |
105 | public LSO_Enums.Vector llGetColor(UInt32 face) { return new LSO_Enums.Vector(); } | 105 | public Axiom.Math.Vector3 llGetColor(UInt32 face) { return new Axiom.Math.Vector3(); } |
106 | public void llSetTexture(string texture, UInt32 face) { return; } | 106 | public void llSetTexture(string texture, UInt32 face) { return; } |
107 | public void llScaleTexture(float u, float v, UInt32 face) { return; } | 107 | public void llScaleTexture(float u, float v, UInt32 face) { return; } |
108 | public void llOffsetTexture(float u, float v, UInt32 face) { return; } | 108 | public void llOffsetTexture(float u, float v, UInt32 face) { return; } |
109 | public void llRotateTexture(float rotation, UInt32 face) { return; } | 109 | public void llRotateTexture(float rotation, UInt32 face) { return; } |
110 | public string llGetTexture(UInt32 face) { return ""; } | 110 | public string llGetTexture(UInt32 face) { return ""; } |
111 | public void llSetPos(LSO_Enums.Vector pos) { return; } | 111 | public void llSetPos(Axiom.Math.Vector3 pos) { return; } |
112 | 112 | ||
113 | 113 | ||
114 | public void llGetPos() { } | 114 | public void llGetPos() { } |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs index 6d1ecda..328f456 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs | |||
@@ -137,7 +137,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
137 | SetScript(ObjectID, ScriptID, Script); | 137 | SetScript(ObjectID, ScriptID, Script); |
138 | // We need to give (untrusted) assembly a private instance of BuiltIns | 138 | // We need to give (untrusted) assembly a private instance of BuiltIns |
139 | // this private copy will contain Read-Only FullScriptID so that it can bring that on to the server whenever needed. | 139 | // this private copy will contain Read-Only FullScriptID so that it can bring that on to the server whenever needed. |
140 | OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO.LSL_BuiltIn_Commands_Interface LSLB = new OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO.LSL_BuiltIn_Commands_TestImplementation(FullScriptID); | 140 | OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL_BuiltIn_Commands_Interface LSLB = new OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL_BuiltIn_Commands_TestImplementation(FullScriptID); |
141 | // Start the script - giving it BuiltIns | 141 | // Start the script - giving it BuiltIns |
142 | Common.SendToDebug("ScriptManager initializing script, handing over private builtin command interface"); | 142 | Common.SendToDebug("ScriptManager initializing script, handing over private builtin command interface"); |
143 | Script.Start(LSLB); | 143 | Script.Start(LSLB); |
diff --git a/prebuild.xml b/prebuild.xml index 6fa3e12..4a62fde 100644 --- a/prebuild.xml +++ b/prebuild.xml | |||
@@ -951,14 +951,9 @@ | |||
951 | <Reference name="System.Data" localCopy="false"/> | 951 | <Reference name="System.Data" localCopy="false"/> |
952 | <Reference name="System.Xml" localCopy="false"/> | 952 | <Reference name="System.Xml" localCopy="false"/> |
953 | <Reference name="OpenSim.Region.Environment" /> | 953 | <Reference name="OpenSim.Region.Environment" /> |
954 | <Reference name="OpenSim.Framework"/> | 954 | <Reference name="Axiom.MathLib.dll" localCopy="false"/> |
955 | <Reference name="OpenSim.Framework.Console"/> | ||
956 | <Reference name="OpenSim.Framework.Data"/> | ||
957 | <Reference name="OpenSim.Framework.Servers"/> | ||
958 | <Reference name="OpenSim.Framework.UserManagement" /> | ||
959 | <Reference name="libsecondlife.dll"/> | 955 | <Reference name="libsecondlife.dll"/> |
960 | <Reference name="Db4objects.Db4o.dll"/> | 956 | <Reference name="OpenSim.Framework"/> |
961 | <Reference name="XMLRPC.dll"/> | ||
962 | <Files> | 957 | <Files> |
963 | <Match pattern="*.cs" recurse="true"/> | 958 | <Match pattern="*.cs" recurse="true"/> |
964 | <Match pattern="*.lso" recurse="true"/> | 959 | <Match pattern="*.lso" recurse="true"/> |