aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs391
1 files changed, 0 insertions, 391 deletions
diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs
deleted file mode 100644
index 7805aa3..0000000
--- a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs
+++ /dev/null
@@ -1,391 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
29{
30 //public partial class LSL_BaseClass
31 //{
32 // /*
33 // * OPCODES
34 // *
35 // * These are internal "assembly" commands,
36 // * basic operators like "ADD", "PUSH" and "POP"
37 // *
38 // * It also contains managed stack and keeps track of internal variables, etc.
39 // *
40 // */
41
42
43 // public void StoreToLocal(UInt32 index)
44 // {
45 // // TODO: How to determine local?
46 // LSOEngine.LSO.Common.SendToDebug("::StoreToLocal " + index);
47 // if (LocalVariables.ContainsKey(index))
48 // LocalVariables.Remove(index);
49 // LocalVariables.Add(index, LSLStack.Peek());
50 // }
51
52 // public void StoreToGlobal(UInt32 index)
53 // {
54 // LSOEngine.LSO.Common.SendToDebug("::StoreToGlobal " + index);
55 // if (GlobalVariables.ContainsKey(index))
56 // GlobalVariables.Remove(index);
57 // GlobalVariables.Add(index, LSLStack.Peek());
58 // }
59
60 // public void StoreToStatic(UInt32 index)
61 // {
62 // LSOEngine.LSO.Common.SendToDebug("::StoreToStatic " + index);
63 // //if (StaticVariables.ContainsKey(index))
64 // // StaticVariables.Remove(index);
65 // StaticVariables.Add(index, LSLStack.Peek());
66 // }
67
68 // public void GetFromLocal(UInt32 index)
69 // {
70 // // TODO: How to determine local?
71 // LSOEngine.LSO.Common.SendToDebug("::GetFromLocal " + index);
72 // object ret;
73 // LocalVariables.TryGetValue(index, out ret);
74 // LSLStack.Push(ret);
75 // //return ret;
76 // }
77
78 // public void GetFromGlobal(UInt32 index)
79 // {
80 // LSOEngine.LSO.Common.SendToDebug("::GetFromGlobal " + index);
81 // object ret;
82 // GlobalVariables.TryGetValue(index, out ret);
83 // LSLStack.Push(ret);
84 // //return ret;
85 // }
86
87 // public void GetFromStatic(UInt32 index)
88 // {
89 // LSOEngine.LSO.Common.SendToDebug("::GetFromStatic " + index);
90 // object ret;
91 // StaticVariables.TryGetValue(index, out ret);
92 // LSOEngine.LSO.Common.SendToDebug("::GetFromStatic - ObjectType: " + ret.GetType().ToString());
93 // LSLStack.Push(ret);
94 // //return ret;
95 // }
96
97 // public object POPToStack()
98 // {
99 // LSOEngine.LSO.Common.SendToDebug("::POPToStack");
100 // //return LSLStack.Pop();
101 // object p = LSLStack.Pop();
102 // if (p.GetType() == typeof (UInt32))
103 // return (UInt32) p;
104 // if (p.GetType() == typeof (string))
105 // return (string) p;
106 // if (p.GetType() == typeof (Int32))
107 // return (Int32) p;
108 // if (p.GetType() == typeof (UInt16))
109 // return (UInt16) p;
110 // if (p.GetType() == typeof (float))
111 // return (float) p;
112 // if (p.GetType() == typeof (LSO_Enums.Vector))
113 // return (LSO_Enums.Vector) p;
114 // if (p.GetType() == typeof (LSO_Enums.Rotation))
115 // return (LSO_Enums.Rotation) p;
116 // if (p.GetType() == typeof (LSO_Enums.Key))
117 // return (LSO_Enums.Key) p;
118
119 // return p;
120 // }
121
122 // //public object POPToStack(UInt32 count)
123 // //{
124 // // // POP NUMBER FROM TOP OF STACK
125 // // //LSLStack.SetLength(LSLStack.Length - 4);
126 // // Common.SendToDebug("::POPToStack " + count);
127 // // if (count < 2)
128 // // return LSLStack.Pop();
129
130 // // Stack<object> s = new Stack<object>();
131 // // for (int i = 0; i < count; i++)
132 // // {
133 // // s.Push(LSLStack.Pop);
134
135 // // }
136
137 // //}
138
139 // public void POP()
140 // {
141 // // POP NUMBER FROM TOP OF STACK
142 // //LSLStack.SetLength(LSLStack.Length - 4);
143 // LSOEngine.LSO.Common.SendToDebug("::POP");
144 // if (LSLStack.Count < 1)
145 // {
146 // //TODO: Temporary fix
147 // LSOEngine.LSO.Common.SendToDebug("ERROR: TRYING TO POP EMPTY STACK!");
148 // }
149 // else
150 // {
151 // LSLStack.Pop();
152 // }
153 // }
154
155 // public void PUSH(object Param)
156 // {
157 // if (Param == null)
158 // {
159 // LSOEngine.LSO.Common.SendToDebug("::PUSH: <null>");
160 // }
161 // else
162 // {
163 // //Common.SendToDebug("::PUSH: " + Param.GetType());
164 // }
165
166 // LSLStack.Push(Param);
167 // }
168
169 // public void ADD(UInt32 Param)
170 // {
171 // LSOEngine.LSO.Common.SendToDebug("::ADD: " + Param);
172 // object o2 = LSLStack.Pop();
173 // object o1 = LSLStack.Pop();
174 // LSOEngine.LSO.Common.SendToDebug("::ADD: Debug: o1: " + o1.GetType() + " (" + o1.ToString() + "), o2: " + o2.GetType() +
175 // " (" + o2.ToString() + ")");
176 // if (o2.GetType() == typeof (string))
177 // {
178 // LSLStack.Push((string) o1 + (string) o2);
179 // return;
180 // }
181 // if (o2.GetType() == typeof (UInt32))
182 // {
183 // LSLStack.Push((UInt32) o1 + (UInt32) o2);
184 // return;
185 // }
186 // }
187
188 // public void SUB(UInt32 Param)
189 // {
190 // LSOEngine.LSO.Common.SendToDebug("::SUB: " + Param);
191 // UInt32 i2 = (UInt32) LSLStack.Pop();
192 // UInt32 i1 = (UInt32) LSLStack.Pop();
193 // LSLStack.Push((UInt32) (i1 - i2));
194 // }
195
196 // public void MUL(UInt32 Param)
197 // {
198 // LSOEngine.LSO.Common.SendToDebug("::SUB: " + Param);
199 // UInt32 i2 = (UInt32) LSLStack.Pop();
200 // UInt32 i1 = (UInt32) LSLStack.Pop();
201 // LSLStack.Push((UInt32) (i1*i2));
202 // }
203
204 // public void DIV(UInt32 Param)
205 // {
206 // LSOEngine.LSO.Common.SendToDebug("::DIV: " + Param);
207 // UInt32 i2 = (UInt32) LSLStack.Pop();
208 // UInt32 i1 = (UInt32) LSLStack.Pop();
209 // LSLStack.Push((UInt32) (i1/i2));
210 // }
211
212
213 // public void MOD(UInt32 Param)
214 // {
215 // LSOEngine.LSO.Common.SendToDebug("::MOD: " + Param);
216 // UInt32 i2 = (UInt32) LSLStack.Pop();
217 // UInt32 i1 = (UInt32) LSLStack.Pop();
218 // LSLStack.Push((UInt32) (i1%i2));
219 // }
220
221 // public void EQ(UInt32 Param)
222 // {
223 // LSOEngine.LSO.Common.SendToDebug("::EQ: " + Param);
224 // UInt32 i2 = (UInt32) LSLStack.Pop();
225 // UInt32 i1 = (UInt32) LSLStack.Pop();
226 // if (i1 == i2)
227 // {
228 // LSLStack.Push((UInt32) 1);
229 // }
230 // else
231 // {
232 // LSLStack.Push((UInt32) 0);
233 // }
234 // }
235
236 // public void NEQ(UInt32 Param)
237 // {
238 // LSOEngine.LSO.Common.SendToDebug("::NEQ: " + Param);
239 // UInt32 i2 = (UInt32) LSLStack.Pop();
240 // UInt32 i1 = (UInt32) LSLStack.Pop();
241 // if (i1 != i2)
242 // {
243 // LSLStack.Push((UInt32) 1);
244 // }
245 // else
246 // {
247 // LSLStack.Push((UInt32) 0);
248 // }
249 // }
250
251 // public void LEQ(UInt32 Param)
252 // {
253 // LSOEngine.LSO.Common.SendToDebug("::LEQ: " + Param);
254 // UInt32 i2 = (UInt32) LSLStack.Pop();
255 // UInt32 i1 = (UInt32) LSLStack.Pop();
256 // if (i1 <= i2)
257 // {
258 // LSLStack.Push((UInt32) 1);
259 // }
260 // else
261 // {
262 // LSLStack.Push((UInt32) 0);
263 // }
264 // }
265
266 // public void GEQ(UInt32 Param)
267 // {
268 // LSOEngine.LSO.Common.SendToDebug("::GEQ: " + Param);
269 // UInt32 i2 = (UInt32) LSLStack.Pop();
270 // UInt32 i1 = (UInt32) LSLStack.Pop();
271 // if (i1 >= i2)
272 // {
273 // LSLStack.Push((UInt32) 1);
274 // }
275 // else
276 // {
277 // LSLStack.Push((UInt32) 0);
278 // }
279 // }
280
281 // public void LESS(UInt32 Param)
282 // {
283 // LSOEngine.LSO.Common.SendToDebug("::LESS: " + Param);
284 // UInt32 i2 = (UInt32) LSLStack.Pop();
285 // UInt32 i1 = (UInt32) LSLStack.Pop();
286 // if (i1 < i2)
287 // {
288 // LSLStack.Push((UInt32) 1);
289 // }
290 // else
291 // {
292 // LSLStack.Push((UInt32) 0);
293 // }
294 // }
295
296 // public void GREATER(UInt32 Param)
297 // {
298 // LSOEngine.LSO.Common.SendToDebug("::GREATER: " + Param);
299 // UInt32 i2 = (UInt32) LSLStack.Pop();
300 // UInt32 i1 = (UInt32) LSLStack.Pop();
301 // if (i1 > i2)
302 // {
303 // LSLStack.Push((UInt32) 1);
304 // }
305 // else
306 // {
307 // LSLStack.Push((UInt32) 0);
308 // }
309 // }
310
311
312 // public void BITAND()
313 // {
314 // LSOEngine.LSO.Common.SendToDebug("::BITAND");
315 // UInt32 i2 = (UInt32) LSLStack.Pop();
316 // UInt32 i1 = (UInt32) LSLStack.Pop();
317 // LSLStack.Push((UInt32) (i1 & i2));
318 // }
319
320 // public void BITOR()
321 // {
322 // LSOEngine.LSO.Common.SendToDebug("::BITOR");
323 // UInt32 i2 = (UInt32) LSLStack.Pop();
324 // UInt32 i1 = (UInt32) LSLStack.Pop();
325 // LSLStack.Push((UInt32) (i1 | i2));
326 // }
327
328 // public void BITXOR()
329 // {
330 // LSOEngine.LSO.Common.SendToDebug("::BITXOR");
331 // UInt32 i2 = (UInt32) LSLStack.Pop();
332 // UInt32 i1 = (UInt32) LSLStack.Pop();
333 // LSLStack.Push((UInt32) (i1 ^ i2));
334 // }
335
336 // public void BOOLAND()
337 // {
338 // LSOEngine.LSO.Common.SendToDebug("::BOOLAND");
339 // bool b2 = bool.Parse((string) LSLStack.Pop());
340 // bool b1 = bool.Parse((string) LSLStack.Pop());
341 // if (b1 && b2)
342 // {
343 // LSLStack.Push((UInt32) 1);
344 // }
345 // else
346 // {
347 // LSLStack.Push((UInt32) 0);
348 // }
349 // }
350
351 // public void BOOLOR()
352 // {
353 // LSOEngine.LSO.Common.SendToDebug("::BOOLOR");
354 // bool b2 = bool.Parse((string) LSLStack.Pop());
355 // bool b1 = bool.Parse((string) LSLStack.Pop());
356
357 // if (b1 || b2)
358 // {
359 // LSLStack.Push((UInt32) 1);
360 // }
361 // else
362 // {
363 // LSLStack.Push((UInt32) 0);
364 // }
365 // }
366
367 // public void NEG(UInt32 Param)
368 // {
369 // LSOEngine.LSO.Common.SendToDebug("::NEG: " + Param);
370 // //UInt32 i2 = (UInt32)LSLStack.Pop();
371 // UInt32 i1 = (UInt32) LSLStack.Pop();
372 // LSLStack.Push((UInt32) (i1*-1));
373 // }
374
375 // public void BITNOT()
376 // {
377 // //Common.SendToDebug("::BITNOT");
378 // //UInt32 i2 = (UInt32)LSLStack.Pop();
379 // //UInt32 i1 = (UInt32)LSLStack.Pop();
380 // //LSLStack.Push((UInt32)(i1 / i2));
381 // }
382
383 // public void BOOLNOT()
384 // {
385 // //Common.SendToDebug("::BOOLNOT");
386 // ////UInt32 i2 = (UInt32)LSLStack.Pop();
387 // //UInt32 i1 = (UInt32)LSLStack.Pop();
388 // //LSLStack.Push((UInt32)(i1));
389 // }
390 //}
391}