-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRTZFunctionEntry.cs
More file actions
32 lines (30 loc) · 897 Bytes
/
RTZFunctionEntry.cs
File metadata and controls
32 lines (30 loc) · 897 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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace RTZParser
{
internal class RTZFunctionEntry
{
public UInt32 Hash;
public UInt32 ParameterNumber;
public UInt32 Num1;
public byte[] InstructionBuffer;
public byte[] GetBytes()
{
MemoryStream ms = new MemoryStream();
BinaryWriter bw = new BinaryWriter(ms);
bw.Write(BitConverter.GetBytes(Hash));
bw.Write((byte)0);
bw.Write(RTZFile.EncodeNum(ParameterNumber));
bw.Write(RTZFile.EncodeNum(Num1));
bw.Write(RTZFile.EncodeNum((UInt32)InstructionBuffer.Length));
bw.Write(InstructionBuffer);
byte[] buffer = ms.ToArray();
ms.Close();
return buffer;
}
}
}