-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRTZObjectMemberEntry.cs
More file actions
39 lines (36 loc) · 991 Bytes
/
RTZObjectMemberEntry.cs
File metadata and controls
39 lines (36 loc) · 991 Bytes
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace RTZParser
{
internal class RTZObjectMemberEntry
{
public UInt32 TypeHash;
public UInt32 MemberNameHash;
public override string ToString()
{
string tName = RTZDefaultType.GetName(TypeHash);
if (tName == "")
{
return string.Format("t{0:X08} v{1:X08}", TypeHash, MemberNameHash);
}
else
{
return string.Format("{0} v{1:X08};", tName, MemberNameHash);
}
}
public byte[] GetBytes()
{
MemoryStream ms = new MemoryStream();
BinaryWriter bw = new BinaryWriter(ms);
bw.Write(MemberNameHash);
bw.Write(TypeHash);
byte[] buffer = ms.ToArray();
ms.Close();
return buffer;
}
}
}