diff options
author | Tedd Hansen | 2008-02-24 16:41:56 +0000 |
---|---|---|
committer | Tedd Hansen | 2008-02-24 16:41:56 +0000 |
commit | 8af64c979fcc993615243d66f03903173ab933b0 (patch) | |
tree | 2eb740170947f48af679b673ac50832f11411f30 /OpenSim/Region/ScriptEngine/LSOEngine/LSO | |
parent | Forgot to change what class compiled scripts must inherit from to get their c... (diff) | |
download | opensim-SC-8af64c979fcc993615243d66f03903173ab933b0.zip opensim-SC-8af64c979fcc993615243d66f03903173ab933b0.tar.gz opensim-SC-8af64c979fcc993615243d66f03903173ab933b0.tar.bz2 opensim-SC-8af64c979fcc993615243d66f03903173ab933b0.tar.xz |
By now you all have learned that when I'm committing scripting usually doesn't work, so no big surprise. :)
Modified baseclass for compiled script to incorp new OSSL commands class and renamed it to follow standards and all that. Scripts may work again. :)
Diffstat (limited to 'OpenSim/Region/ScriptEngine/LSOEngine/LSO')
-rw-r--r-- | OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_OPCODE_IL_processor.cs | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs index c6fa4ce..a64f580 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs | |||
@@ -86,7 +86,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
86 | TypeBuilder typeBuilder = modBuilder.DefineType( | 86 | TypeBuilder typeBuilder = modBuilder.DefineType( |
87 | "LSL_ScriptObject", | 87 | "LSL_ScriptObject", |
88 | TypeAttributes.Public | TypeAttributes.BeforeFieldInit, | 88 | TypeAttributes.Public | TypeAttributes.BeforeFieldInit, |
89 | typeof (LSL_BaseClass)); | 89 | typeof (BuiltIn_Commands_BaseClass)); |
90 | //, | 90 | //, |
91 | // typeof()); | 91 | // typeof()); |
92 | //, typeof(LSL_BuiltIn_Commands_Interface)); | 92 | //, typeof(LSL_BuiltIn_Commands_Interface)); |
@@ -179,7 +179,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
179 | new Type[0]); | 179 | new Type[0]); |
180 | 180 | ||
181 | //Define the reflection ConstructorInfor for System.Object | 181 | //Define the reflection ConstructorInfor for System.Object |
182 | ConstructorInfo conObj = typeof (LSL_BaseClass).GetConstructor(new Type[0]); | 182 | ConstructorInfo conObj = typeof (BuiltIn_Commands_BaseClass).GetConstructor(new Type[0]); |
183 | 183 | ||
184 | //call constructor of base object | 184 | //call constructor of base object |
185 | ILGenerator il = constructor.GetILGenerator(); | 185 | ILGenerator il = constructor.GetILGenerator(); |
@@ -272,7 +272,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
272 | 272 | ||
273 | // Make call | 273 | // Make call |
274 | il.Emit(OpCodes.Call, | 274 | il.Emit(OpCodes.Call, |
275 | typeof (LSL_BaseClass).GetMethod("AddToStatic", new Type[] {typeof (UInt32), datatype})); | 275 | typeof (BuiltIn_Commands_BaseClass).GetMethod("AddToStatic", new Type[] {typeof (UInt32), datatype})); |
276 | } | 276 | } |
277 | } | 277 | } |
278 | 278 | ||
diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_OPCODE_IL_processor.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_OPCODE_IL_processor.cs index 30d3890..8c5262b 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_OPCODE_IL_processor.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_OPCODE_IL_processor.cs | |||
@@ -162,7 +162,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
162 | if (mi.Name == fname) | 162 | if (mi.Name == fname) |
163 | { | 163 | { |
164 | il.Emit(OpCodes.Ldarg_0); | 164 | il.Emit(OpCodes.Ldarg_0); |
165 | il.Emit(OpCodes.Call, typeof (LSL_BaseClass).GetMethod("GetLSL_BuiltIn", new Type[] {})); | 165 | il.Emit(OpCodes.Call, typeof (BuiltIn_Commands_BaseClass).GetMethod("GetLSL_BuiltIn", new Type[] {})); |
166 | // Pop required number of items from my stack to .Net stack | 166 | // Pop required number of items from my stack to .Net stack |
167 | IL_PopToStack(il, mi.GetParameters().Length); | 167 | IL_PopToStack(il, mi.GetParameters().Length); |
168 | il.Emit(OpCodes.Callvirt, mi); | 168 | il.Emit(OpCodes.Callvirt, mi); |
@@ -377,7 +377,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
377 | private void IL_CallBaseFunction(ILGenerator il, string methodname) | 377 | private void IL_CallBaseFunction(ILGenerator il, string methodname) |
378 | { | 378 | { |
379 | il.Emit(OpCodes.Ldarg_0); | 379 | il.Emit(OpCodes.Ldarg_0); |
380 | il.Emit(OpCodes.Call, typeof (LSL_BaseClass).GetMethod(methodname, new Type[] {})); | 380 | il.Emit(OpCodes.Call, typeof (BuiltIn_Commands_BaseClass).GetMethod(methodname, new Type[] {})); |
381 | } | 381 | } |
382 | 382 | ||
383 | private void IL_CallBaseFunction(ILGenerator il, string methodname, object data) | 383 | private void IL_CallBaseFunction(ILGenerator il, string methodname, object data) |
@@ -387,7 +387,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
387 | il.Emit(OpCodes.Ldstr, (string) data); | 387 | il.Emit(OpCodes.Ldstr, (string) data); |
388 | if (data.GetType() == typeof (UInt32)) | 388 | if (data.GetType() == typeof (UInt32)) |
389 | il.Emit(OpCodes.Ldc_I4, (UInt32) data); | 389 | il.Emit(OpCodes.Ldc_I4, (UInt32) data); |
390 | il.Emit(OpCodes.Call, typeof (LSL_BaseClass).GetMethod(methodname, new Type[] {data.GetType()})); | 390 | il.Emit(OpCodes.Call, typeof (BuiltIn_Commands_BaseClass).GetMethod(methodname, new Type[] {data.GetType()})); |
391 | } | 391 | } |
392 | 392 | ||
393 | private void IL_Push(ILGenerator il, object data) | 393 | private void IL_Push(ILGenerator il, object data) |
@@ -397,7 +397,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
397 | 397 | ||
398 | IL_PushDataTypeToILStack(il, data); | 398 | IL_PushDataTypeToILStack(il, data); |
399 | 399 | ||
400 | il.Emit(OpCodes.Call, typeof (LSL_BaseClass).GetMethod("PUSH", new Type[] {data.GetType()})); | 400 | il.Emit(OpCodes.Call, typeof (BuiltIn_Commands_BaseClass).GetMethod("PUSH", new Type[] {data.GetType()})); |
401 | } | 401 | } |
402 | 402 | ||
403 | private void IL_PushDataTypeToILStack(ILGenerator il, object data) | 403 | private void IL_PushDataTypeToILStack(ILGenerator il, object data) |