-
Notifications
You must be signed in to change notification settings - Fork 2
/
Xbox360PluginCodeGenerator.cs
36 lines (30 loc) · 1.08 KB
/
Xbox360PluginCodeGenerator.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
using ReClassNET.CodeGenerator;
using ReClassNET.Logger;
using ReClassNET.Nodes;
using Xbox360Plugin.TextPointers;
namespace Xbox360Plugin
{
public class Xbox360PluginCodeGenerator : CustomCppCodeGenerator
{
public override bool CanHandle(BaseNode node)
{
return node is Pointer32Node ||
node is Utf8TextPtr32Node ||
node is Utf16TextPtr32Node;
}
public override BaseNode TransformNode(BaseNode node)
{
return node;
}
public override string GetTypeDefinition(BaseNode node, GetTypeDefinitionFunc defaultGetTypeDefinitionFunc, ResolveWrappedTypeFunc defaultResolveWrappedTypeFunc, ILogger logger)
{
if(node is Pointer32Node)
return $"{((ClassInstanceNode)((Pointer32Node)node).InnerNode).InnerNode.Name}*";
if (node is Utf8TextPtr32Node)
return "char *";
if (node is Utf16TextPtr32Node)
return "wchar_t *";
return "";
}
}
}