aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Struct.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Struct.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Struct.cs143
1 files changed, 143 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Struct.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Struct.cs
new file mode 100644
index 0000000..915280c
--- /dev/null
+++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Struct.cs
@@ -0,0 +1,143 @@
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*/
28/* Original code: Tedd Hansen */
29
30using System;
31using System.Collections;
32using System.Collections.Generic;
33
34namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
35{
36 internal static class LSO_Struct
37 {
38 public struct Header
39 {
40 public UInt32 TM;
41 public UInt32 IP;
42 public UInt32 VN;
43 public UInt32 BP;
44 public UInt32 SP;
45 public UInt32 HR;
46 public UInt32 HP;
47 public UInt32 CS;
48 public UInt32 NS;
49 public UInt32 CE;
50 public UInt32 IE;
51 public UInt32 ER;
52 public UInt32 FR;
53 public UInt32 SLR;
54 public UInt32 GVR;
55 public UInt32 GFR;
56 public UInt32 PR;
57 public UInt32 ESR;
58 public UInt32 SR;
59 public UInt64 NCE;
60 public UInt64 NIE;
61 public UInt64 NER;
62 }
63
64 public struct StaticBlock
65 {
66 public UInt32 Static_Chunk_Header_Size;
67 public byte ObjectType;
68 public byte Unknown;
69 public byte[] BlockVariable;
70 }
71
72 /* Not actually a structure
73 public struct StaticBlockVariable
74 {
75 public UInt32 Integer1;
76 public UInt32 Float1;
77 public UInt32 HeapPointer_String;
78 public UInt32 HeapPointer_Key;
79 public byte[] Vector_12;
80 public byte[] Rotation_16;
81 public UInt32 Pointer_List_Structure;
82 } */
83
84 public struct HeapBlock
85 {
86 public Int32 DataBlockSize;
87 public byte ObjectType;
88 public UInt16 ReferenceCount;
89 public byte[] Data;
90 }
91
92 public struct StateFrameBlock
93 {
94 public UInt32 StateCount;
95 public StatePointerBlock[] StatePointer;
96 }
97
98 public struct StatePointerBlock
99 {
100 public UInt32 Location;
101 public BitArray EventMask;
102 public StateBlock StateBlock;
103 }
104
105 public struct StateBlock
106 {
107 public UInt32 StartPos;
108 public UInt32 EndPos;
109 public UInt32 HeaderSize;
110 public byte Unknown;
111 public StateBlockHandler[] StateBlockHandlers;
112 }
113
114 public struct StateBlockHandler
115 {
116 public UInt32 CodeChunkPointer;
117 public UInt32 CallFrameSize;
118 }
119
120 public struct FunctionBlock
121 {
122 public UInt32 FunctionCount;
123 public UInt32[] CodeChunkPointer;
124 }
125
126 public struct CodeChunk
127 {
128 public UInt32 CodeChunkHeaderSize;
129 public string Comment;
130 public List<CodeChunkArgument> CodeChunkArguments;
131 public byte EndMarker;
132 public byte ReturnTypePos;
133 public StaticBlock ReturnType;
134 }
135
136 public struct CodeChunkArgument
137 {
138 public byte FunctionReturnTypePos;
139 public byte NullString;
140 public StaticBlock FunctionReturnType;
141 }
142 }
143} \ No newline at end of file