forked from ExileLord/Open-GHTCP
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathQbScriptNode.cs
132 lines (118 loc) · 3.27 KB
/
QbScriptNode.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
using System;
using System.Drawing;
using GHNamespace9;
using GHNamespaceC;
using GHNamespaceE;
namespace GHNamespaceB
{
public class QbScriptNode : AbstractTreeNode1
{
public byte[] Byte0;
public int Int0;
public QbScriptNode()
{
Int0 = -1;
Byte0 = new byte[]
{
1,
36
};
vmethod_0();
}
public override int vmethod_1()
{
return 36;
}
public override void vmethod_13(Stream26 stream260)
{
Int0 = stream260.ReadInt();
int num = stream260.ReadInt();
int num2 = stream260.ReadInt();
byte[] byte_ = stream260.ReadBytes(num2, false);
if (num == num2)
{
Byte0 = byte_;
}
else
{
Byte0 = new Class320().method_4(byte_);
}
stream260.Position += smethod_0(stream260.Position);
}
public override void vmethod_14(Stream26 stream260)
{
stream260.WriteInt(Int0);
stream260.WriteInt(Byte0.Length);
byte[] array = new Class320().method_0(Byte0);
if (Byte0.Length <= array.Length)
{
array = Byte0;
}
stream260.WriteInt(array.Length);
stream260.WriteByteArray(array, false);
stream260.WriteNBytes(0, smethod_0(stream260.Position));
}
public override int CompareTo(object target)
{
if (!(target is QbScriptNode))
{
return -1;
}
if (((QbScriptNode) target).Int0 == Int0)
{
return 0;
}
return 1;
}
public override string GetText()
{
if (QbSongClass1.ContainsKey(Int0))
{
return QbSongClass1.GetDictString(Int0) + " (Script)";
}
return KeyGenerator.ValToHex32Bit(Int0) + " (Script Tag)";
}
public void method_7(byte[] byte1)
{
Byte0 = byte1;
}
public override string GetNodeText()
{
return "QB Script";
}
public override void vmethod_2(ref int int1)
{
int1 += 12;
if (Byte0 != null)
{
byte[] array = new Class320().method_0(Byte0);
if (Byte0.Length <= array.Length)
{
array = Byte0;
}
int1 += array.Length;
}
int1 += smethod_0(int1);
}
public override object Clone()
{
QbScriptNode @class = (QbScriptNode) base.Clone();
@class.Int0 = Int0;
@class.Byte0 = new byte[Byte0.Length];
Buffer.BlockCopy(Byte0, 0, @class.Byte0, 0, Byte0.Length);
return @class;
}
public override Color GetColor()
{
return Color.Pink;
}
public override string GetToolTipText()
{
if (Byte0 != null)
{
return Byte0.Length + " QB Script Bytes";
}
return "No QB Script Bytes";
}
}
}