mirror of
https://github.com/kwsch/pkNX.git
synced 2026-08-22 10:24:27 -05:00
SV Teal Mask Support (#348)
Closes #347 Closes #341 Co-authored-by: Michael Scire <SciresM@gmail.com> Co-authored-by: sora10pls <17801814+sora10pls@users.noreply.github.com> Co-authored-by: Lusamine <30205550+Lusamine@users.noreply.github.com>
This commit is contained in:
@@ -9,12 +9,35 @@ insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
end_of_line = lf
|
||||
|
||||
# Solution Files
|
||||
[*.sln]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
# XML Project Files
|
||||
[*.csproj]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
# Code Files
|
||||
[*.fbs]
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
tab_width = 2
|
||||
end_of_line = lf
|
||||
|
||||
# Code Files
|
||||
[*.cs]
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
tab_width = 4
|
||||
end_of_line = lf
|
||||
csharp_prefer_braces = when_multiline:warning
|
||||
dotnet_diagnostic.IDE0047.severity = none
|
||||
dotnet_diagnostic.IDE0048.severity = none
|
||||
@@ -22,21 +45,6 @@ dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:sug
|
||||
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:suggest
|
||||
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:suggest
|
||||
dotnet_style_parentheses_in_other_operators = always_for_clarity:suggest
|
||||
csharp_indent_labels = one_less_than_current
|
||||
csharp_using_directive_placement = outside_namespace:silent
|
||||
csharp_prefer_simple_using_statement = true:suggestion
|
||||
csharp_style_namespace_declarations = block_scoped:silent
|
||||
csharp_style_prefer_method_group_conversion = true:silent
|
||||
csharp_style_prefer_top_level_statements = true:silent
|
||||
csharp_style_prefer_primary_constructors = true:suggestion
|
||||
csharp_style_expression_bodied_methods = false:silent
|
||||
csharp_style_expression_bodied_constructors = false:silent
|
||||
csharp_style_expression_bodied_operators = false:silent
|
||||
csharp_style_expression_bodied_properties = true:silent
|
||||
csharp_style_expression_bodied_indexers = true:silent
|
||||
csharp_style_expression_bodied_accessors = true:silent
|
||||
csharp_style_expression_bodied_lambdas = true:silent
|
||||
csharp_style_expression_bodied_local_functions = false:silent
|
||||
|
||||
# Generated Code
|
||||
[**/obj/**.cs]
|
||||
@@ -55,61 +63,5 @@ dotnet_analyzer_diagnostic.severity = none
|
||||
|
||||
# Naming rules
|
||||
|
||||
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
|
||||
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
|
||||
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
|
||||
|
||||
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
|
||||
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
|
||||
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
|
||||
|
||||
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
|
||||
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
|
||||
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
|
||||
|
||||
# Symbol specifications
|
||||
|
||||
dotnet_naming_symbols.interface.applicable_kinds = interface
|
||||
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.interface.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
|
||||
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.types.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
|
||||
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.non_field_members.required_modifiers =
|
||||
|
||||
# Naming styles
|
||||
|
||||
dotnet_naming_style.begins_with_i.required_prefix = I
|
||||
dotnet_naming_style.begins_with_i.required_suffix =
|
||||
dotnet_naming_style.begins_with_i.word_separator =
|
||||
dotnet_naming_style.begins_with_i.capitalization = pascal_case
|
||||
|
||||
dotnet_naming_style.pascal_case.required_prefix =
|
||||
dotnet_naming_style.pascal_case.required_suffix =
|
||||
dotnet_naming_style.pascal_case.word_separator =
|
||||
dotnet_naming_style.pascal_case.capitalization = pascal_case
|
||||
|
||||
dotnet_naming_style.pascal_case.required_prefix =
|
||||
dotnet_naming_style.pascal_case.required_suffix =
|
||||
dotnet_naming_style.pascal_case.word_separator =
|
||||
dotnet_naming_style.pascal_case.capitalization = pascal_case
|
||||
dotnet_style_operator_placement_when_wrapping = beginning_of_line
|
||||
dotnet_style_coalesce_expression = true:suggestion
|
||||
dotnet_style_null_propagation = true:suggestion
|
||||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
|
||||
dotnet_style_prefer_auto_properties = true:silent
|
||||
dotnet_style_object_initializer = true:suggestion
|
||||
dotnet_style_collection_initializer = true:suggestion
|
||||
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
|
||||
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
|
||||
dotnet_style_prefer_conditional_expression_over_return = true:silent
|
||||
dotnet_style_explicit_tuple_names = true:suggestion
|
||||
dotnet_style_prefer_inferred_tuple_names = true:suggestion
|
||||
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
|
||||
dotnet_style_prefer_compound_assignment = true:suggestion
|
||||
dotnet_style_prefer_simplified_interpolation = true:suggestion
|
||||
dotnet_style_namespace_match_folder = true:suggestion
|
||||
dotnet_naming_style.begins_with_i.capitalization = pascal_case
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
|
||||
namespace pkNX.Containers;
|
||||
|
||||
@@ -17,7 +17,7 @@ public static class FnvHash
|
||||
/// <param name="input">Input sequence</param>
|
||||
/// <param name="hash">Initial hash value</param>
|
||||
/// <returns>Computed hash code</returns>
|
||||
public static ulong HashFnv1_64(IEnumerable<char> input, ulong hash = kOffsetBasis_64)
|
||||
public static ulong HashFnv1_64(ReadOnlySpan<char> input, ulong hash = kOffsetBasis_64)
|
||||
{
|
||||
foreach (var c in input)
|
||||
{
|
||||
@@ -33,7 +33,7 @@ public static ulong HashFnv1_64(IEnumerable<char> input, ulong hash = kOffsetBas
|
||||
/// <param name="input">Input sequence</param>
|
||||
/// <param name="hash">Initial hash value</param>
|
||||
/// <returns>Computed hash code</returns>
|
||||
public static ulong HashFnv1_64(IEnumerable<byte> input, ulong hash = kOffsetBasis_64)
|
||||
public static ulong HashFnv1_64(ReadOnlySpan<byte> input, ulong hash = kOffsetBasis_64)
|
||||
{
|
||||
foreach (var c in input)
|
||||
{
|
||||
@@ -49,7 +49,7 @@ public static ulong HashFnv1_64(IEnumerable<byte> input, ulong hash = kOffsetBas
|
||||
/// <param name="input">Input sequence</param>
|
||||
/// <param name="hash">Initial hash value</param>
|
||||
/// <returns>Computed hash code</returns>
|
||||
public static ulong HashFnv1a_64(IEnumerable<char> input, ulong hash = kOffsetBasis_64)
|
||||
public static ulong HashFnv1a_64(ReadOnlySpan<char> input, ulong hash = kOffsetBasis_64)
|
||||
{
|
||||
foreach (var c in input)
|
||||
{
|
||||
@@ -65,7 +65,7 @@ public static ulong HashFnv1a_64(IEnumerable<char> input, ulong hash = kOffsetBa
|
||||
/// <param name="input">Input sequence</param>
|
||||
/// <param name="hash">Initial hash value</param>
|
||||
/// <returns>Computed hash code</returns>
|
||||
public static ulong HashFnv1a_64(IEnumerable<byte> input, ulong hash = kOffsetBasis_64)
|
||||
public static ulong HashFnv1a_64(ReadOnlySpan<byte> input, ulong hash = kOffsetBasis_64)
|
||||
{
|
||||
foreach (var c in input)
|
||||
{
|
||||
@@ -85,7 +85,7 @@ public static ulong HashFnv1a_64(IEnumerable<byte> input, ulong hash = kOffsetBa
|
||||
/// <param name="input">Input sequence</param>
|
||||
/// <param name="hash">Initial hash value</param>
|
||||
/// <returns>Computed hash code</returns>
|
||||
public static uint HashFnv1_32(IEnumerable<char> input, uint hash = kOffsetBasis_32)
|
||||
public static uint HashFnv1_32(ReadOnlySpan<char> input, uint hash = kOffsetBasis_32)
|
||||
{
|
||||
foreach (var c in input)
|
||||
{
|
||||
@@ -101,7 +101,7 @@ public static uint HashFnv1_32(IEnumerable<char> input, uint hash = kOffsetBasis
|
||||
/// <param name="input">Input sequence</param>
|
||||
/// <param name="hash">Initial hash value</param>
|
||||
/// <returns>Computed hash code</returns>
|
||||
public static uint HashFnv1a_32(IEnumerable<char> input, uint hash = kOffsetBasis_32)
|
||||
public static uint HashFnv1a_32(ReadOnlySpan<char> input, uint hash = kOffsetBasis_32)
|
||||
{
|
||||
foreach (var c in input)
|
||||
{
|
||||
|
||||
@@ -91,6 +91,7 @@ private static GameVersion GetGameFromPath(string romfs, string? exefs)
|
||||
private const int FILECOUNT_SV_101 = 25; // Ver. 1.0.1 (Day 1 Patch)
|
||||
private const int FILECOUNT_SV_120 = 26; // Ver. 1.2.0 (Paradox x2)
|
||||
private const int FILECOUNT_SV_130 = 27; // Ver. 1.3.0 (Paradox x2 Bad Egg fix)
|
||||
private const int FILECOUNT_SV_201 = 28; // Ver. 2.0.1 (Teal Mask)
|
||||
|
||||
private static GameVersion GetGameFromCount(int fileCount, string romfs, string? exefs)
|
||||
{
|
||||
@@ -149,6 +150,7 @@ private static GameVersion GetGameFromCount(int fileCount, string romfs, string?
|
||||
case FILECOUNT_SV_101:
|
||||
case FILECOUNT_SV_120:
|
||||
case FILECOUNT_SV_130:
|
||||
case FILECOUNT_SV_201:
|
||||
{
|
||||
if (exefs == null)
|
||||
return GameVersion.SV;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<ProjectReference Include="..\pkNX.Randomization\pkNX.Randomization.csproj" />
|
||||
<ProjectReference Include="..\pkNX.Structures.FlatBuffers.Arceus\pkNX.Structures.FlatBuffers.Arceus.csproj" />
|
||||
<ProjectReference Include="..\pkNX.Structures.FlatBuffers.LGPE\pkNX.Structures.FlatBuffers.LGPE.csproj" />
|
||||
<ProjectReference Include="..\pkNX.Structures.FlatBuffers.SV\pkNX.Structures.FlatBuffers.SV.csproj" />
|
||||
<ProjectReference Include="..\pkNX.Structures.FlatBuffers.SV\pkNX.Structures.FlatBuffers.SV.Trinity\pkNX.Structures.FlatBuffers.SV.Trinity.csproj" />
|
||||
<ProjectReference Include="..\pkNX.Structures.FlatBuffers.SWSH\pkNX.Structures.FlatBuffers.SWSH.csproj" />
|
||||
<ProjectReference Include="..\pkNX.Structures\pkNX.Structures.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
<ProjectReference Include="..\pkNX.Structures\pkNX.Structures.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FlatSharp.Runtime" Version="7.2.3" />
|
||||
<PackageReference Include="FlatSharp.Compiler" Version="7.2.3">
|
||||
<PackageReference Include="FlatSharp.Runtime" Version="7.3.0" />
|
||||
<PackageReference Include="FlatSharp.Compiler" Version="7.3.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
@@ -25,7 +25,6 @@
|
||||
|
||||
<ItemGroup>
|
||||
<FlatSharpSchema Include="Schemas\**\*.fbs">
|
||||
<IncludePath>Schemas\</IncludePath>
|
||||
<IncludePath>..\pkNX.Structures.FlatBuffers\Schemas\</IncludePath>
|
||||
</FlatSharpSchema>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FlatSharp.Runtime" Version="7.2.3" />
|
||||
<PackageReference Include="FlatSharp.Compiler" Version="7.2.3">
|
||||
<PackageReference Include="FlatSharp.Runtime" Version="7.3.0" />
|
||||
<PackageReference Include="FlatSharp.Compiler" Version="7.3.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
<ItemGroup>
|
||||
<FlatSharpSchema Include="Schemas\**\*.fbs">
|
||||
<IncludePath>Schemas\</IncludePath>
|
||||
<IncludePath>..\pkNX.Structures.FlatBuffers\Schemas\</IncludePath>
|
||||
</FlatSharpSchema>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -16,7 +16,7 @@ public static class SchemaDump
|
||||
/// <param name="settings"></param>
|
||||
public static Schema HandleReflection(byte[] data, string filePath, string dir, SchemaDumpSettings settings)
|
||||
{
|
||||
var schema = Schema.Serializer.Parse(data, FlatBufferDeserializationOption.Greedy);
|
||||
var schema = Schema.Serializer.Parse(data, FlatBufferDeserializationOption.GreedyMutable);
|
||||
DumpSchema(schema, filePath, dir, settings);
|
||||
return schema;
|
||||
}
|
||||
@@ -38,7 +38,7 @@ public static void DumpSchema(Schema schema, string filePath, string dir, Schema
|
||||
|
||||
public static void DumpSchema(byte[] data, TextWriter fbs, TextWriter cs, SchemaDumpSettings settings)
|
||||
{
|
||||
var schema = Schema.Serializer.Parse(data, FlatBufferDeserializationOption.Greedy);
|
||||
var schema = Schema.Serializer.Parse(data, FlatBufferDeserializationOption.GreedyMutable);
|
||||
DumpSchema(schema, fbs, cs, settings);
|
||||
}
|
||||
|
||||
@@ -49,26 +49,26 @@ public static void DumpSchema(Schema schema, TextWriter fbs, TextWriter cs, Sche
|
||||
|
||||
DumpObjects(schema, fbs, cs, settings.StripNamespace);
|
||||
DumpEnums(schema, fbs, settings.StripNamespace);
|
||||
|
||||
if (schema.RootTable?.Name is { } x)
|
||||
fbs.WriteLine($"root_type {x};");
|
||||
}
|
||||
|
||||
private static void WriteHeaderFBS(Schema schema, TextWriter fbs, string fileNameSpace)
|
||||
{
|
||||
fbs.WriteLine("attribute \"fs_vector\"");
|
||||
fbs.WriteLine("attribute \"fs_serializer\"");
|
||||
fbs.WriteLine("attribute \"fs_valueStruct\"");
|
||||
fbs.WriteLine("attribute \"fs_nonVirtual\"");
|
||||
fbs.WriteLine("attribute \"fs_unsafeStructVector\"");
|
||||
fbs.WriteLine();
|
||||
fbs.WriteLine($"namespace {fileNameSpace};");
|
||||
fbs.WriteLine();
|
||||
fbs.WriteLine("attribute \"fs_vector\";");
|
||||
fbs.WriteLine("attribute \"fs_serializer\";");
|
||||
fbs.WriteLine("attribute \"fs_valueStruct\";");
|
||||
fbs.WriteLine("attribute \"fs_nonVirtual\";");
|
||||
fbs.WriteLine("attribute \"fs_unsafeStructVector\";");
|
||||
fbs.WriteLine();
|
||||
fbs.WriteLine("// Generated by FlatSharp");
|
||||
fbs.WriteLine($"// FileIdentifier: {schema.FileIdent}");
|
||||
fbs.WriteLine($"// FileExtension: {schema.FileExt}");
|
||||
fbs.WriteLine($"// Object Count: {schema.Objects.Count}");
|
||||
fbs.WriteLine($"// Enum Count: {schema.Enums.Count}");
|
||||
|
||||
if (schema.RootTable?.Name is { } x)
|
||||
fbs.WriteLine($"root_type {x};");
|
||||
}
|
||||
|
||||
private static void WriteHeaderCS(Schema schema, TextWriter cs, string fileNameSpace)
|
||||
@@ -105,7 +105,7 @@ private static void DumpObjects(Schema schema, TextWriter fbs, TextWriter cs, bo
|
||||
for (var i = list.Count - 1; i >= 0; i--)
|
||||
{
|
||||
var obj = list[i];
|
||||
|
||||
|
||||
cs.WriteLine();
|
||||
cs.WriteLine("[TypeConverter(typeof(ExpandableObjectConverter))]");
|
||||
cs.WriteLine($"public partial {(obj.IsStruct ? "struct" : "class")} {GetName(obj.Name, stripNamespace)} {{ }}");
|
||||
@@ -170,7 +170,7 @@ private static void DumpEnums(Schema schema, TextWriter fbs, bool stripNamespace
|
||||
{
|
||||
var def = list[i];
|
||||
fbs.WriteLine();
|
||||
|
||||
|
||||
var typeName = def.UnderlyingType.ToFBS(schema, i, true);
|
||||
var implType = $" : {typeName}";
|
||||
var defName = GetName(def.Name, stripNamespace);
|
||||
@@ -186,13 +186,16 @@ private static void DumpEnums(Schema schema, TextWriter fbs, bool stripNamespace
|
||||
|
||||
private static string ToFBS(this Type type, Schema schema, int index, bool force = false)
|
||||
{
|
||||
var size = type.FixedLength;
|
||||
var sizeStr = size > 0 ? $":{size}" : "";
|
||||
|
||||
if (index != -1)
|
||||
{
|
||||
var idx = type.Index;
|
||||
if (type.BaseType == BaseType.Array)
|
||||
return $"[{GetName(schema, idx, type.Element)}]";
|
||||
if (type.BaseType is BaseType.Array)
|
||||
return $"[{GetName(schema, idx, type.Element)}{sizeStr}]";
|
||||
if (type.BaseType == BaseType.Vector)
|
||||
return $"[{GetName(schema, idx, type.Element)}]";
|
||||
return $"[{GetName(schema, idx, type.Element)}{sizeStr}]";
|
||||
if (type.BaseType == BaseType.Obj)
|
||||
return $"{schema.Objects[idx].Name}";
|
||||
if (!force)
|
||||
@@ -201,9 +204,9 @@ private static string ToFBS(this Type type, Schema schema, int index, bool force
|
||||
|
||||
var baseType = type.BaseType;
|
||||
if (baseType is BaseType.Array)
|
||||
return $"[{GetName(type.Element)}]";
|
||||
return $"[{GetName(type.Element)}{sizeStr}]";
|
||||
if (baseType is BaseType.Vector)
|
||||
return $"[{GetName(type.Element)}]";
|
||||
return $"[{GetName(type.Element)}{sizeStr}]";
|
||||
|
||||
var x = GetName(baseType);
|
||||
if (type.Element != BaseType.None)
|
||||
|
||||
@@ -12,7 +12,7 @@ public static class SchemaDumpOld
|
||||
{
|
||||
public static Schema HandleReflection(byte[] data, string filePath, string dir, SchemaDumpSettings settings)
|
||||
{
|
||||
var schema = Schema.Serializer.Parse(data, FlatBufferDeserializationOption.Greedy);
|
||||
var schema = Schema.Serializer.Parse(data, FlatBufferDeserializationOption.GreedyMutable);
|
||||
DumpSchema(schema, filePath, dir, settings);
|
||||
return schema;
|
||||
}
|
||||
@@ -34,7 +34,7 @@ public static void DumpSchema(Schema schema, string filePath, string dir, Schema
|
||||
|
||||
public static void DumpSchema(byte[] data, TextWriter fbs, TextWriter cs, SchemaDumpSettings settings)
|
||||
{
|
||||
var schema = Schema.Serializer.Parse(data, FlatBufferDeserializationOption.Greedy);
|
||||
var schema = Schema.Serializer.Parse(data, FlatBufferDeserializationOption.GreedyMutable);
|
||||
DumpSchema(schema, fbs, cs, settings);
|
||||
}
|
||||
|
||||
@@ -43,28 +43,28 @@ public static void DumpSchema(Schema schema, TextWriter fbs, TextWriter cs, Sche
|
||||
WriteHeaderFBS(schema, fbs, settings.FileNamespace);
|
||||
WriteHeaderCS(schema, cs, settings.FileNamespace);
|
||||
|
||||
DumpObjects(schema, fbs, cs, settings.StripNamespace);
|
||||
DumpEnums(schema, fbs, settings.StripNamespace);
|
||||
DumpObjects(schema, fbs, cs, settings.StripNamespace);
|
||||
|
||||
if (schema.RootTable?.Name is { } x)
|
||||
fbs.WriteLine($"root_type {x};");
|
||||
}
|
||||
|
||||
private static void WriteHeaderFBS(Schema schema, TextWriter fbs, string fileNameSpace)
|
||||
{
|
||||
fbs.WriteLine("attribute \"fs_vector\"");
|
||||
fbs.WriteLine("attribute \"fs_serializer\"");
|
||||
fbs.WriteLine("attribute \"fs_valueStruct\"");
|
||||
fbs.WriteLine("attribute \"fs_nonVirtual\"");
|
||||
fbs.WriteLine("attribute \"fs_unsafeStructVector\"");
|
||||
fbs.WriteLine();
|
||||
fbs.WriteLine($"namespace {fileNameSpace};");
|
||||
fbs.WriteLine();
|
||||
fbs.WriteLine("attribute \"fs_vector\";");
|
||||
fbs.WriteLine("attribute \"fs_serializer\";");
|
||||
fbs.WriteLine("attribute \"fs_valueStruct\";");
|
||||
fbs.WriteLine("attribute \"fs_nonVirtual\";");
|
||||
fbs.WriteLine("attribute \"fs_unsafeStructVector\";");
|
||||
fbs.WriteLine();
|
||||
fbs.WriteLine("// Generated by FlatSharp");
|
||||
fbs.WriteLine($"// FileIdentifier: {schema.FileIdent}");
|
||||
fbs.WriteLine($"// FileExtension: {schema.FileExt}");
|
||||
fbs.WriteLine($"// Object Count: {schema.Objects.Count}");
|
||||
fbs.WriteLine($"// Enum Count: {schema.Enums.Count}");
|
||||
|
||||
if (schema.RootTable?.Name is { } x)
|
||||
fbs.WriteLine($"root_type {x};");
|
||||
}
|
||||
|
||||
private static void WriteHeaderCS(Schema schema, TextWriter cs, string fileNameSpace)
|
||||
@@ -101,7 +101,7 @@ private static void DumpObjects(Schema schema, TextWriter fbs, TextWriter cs, bo
|
||||
for (var i = list.Count - 1; i >= 0; i--)
|
||||
{
|
||||
var obj = list[i];
|
||||
|
||||
|
||||
cs.WriteLine();
|
||||
cs.WriteLine("[TypeConverter(typeof(ExpandableObjectConverter))]");
|
||||
cs.WriteLine($"public partial {(obj.IsStruct ? "struct" : "class")} {GetName(obj.Name, stripNamespace)} {{ }}");
|
||||
@@ -166,7 +166,7 @@ private static void DumpEnums(Schema schema, TextWriter fbs, bool stripNamespace
|
||||
{
|
||||
var def = list[i];
|
||||
fbs.WriteLine();
|
||||
|
||||
|
||||
var typeName = def.UnderlyingType.ToFBS(schema, i, true);
|
||||
var implType = $" : {typeName}";
|
||||
var defName = GetName(def.Name, stripNamespace);
|
||||
@@ -185,13 +185,16 @@ private static void DumpEnums(Schema schema, TextWriter fbs, bool stripNamespace
|
||||
|
||||
private static string ToFBS(this Type type, Schema schema, int index, bool force = false)
|
||||
{
|
||||
var size = type.FixedLength;
|
||||
var sizeStr = size > 0 ? $":{size}" : "";
|
||||
|
||||
if (index != -1)
|
||||
{
|
||||
var idx = type.Index;
|
||||
if (type.BaseType == BaseType.Array)
|
||||
return $"[{GetName(schema, idx, type.Element)}]";
|
||||
return $"[{GetName(schema, idx, type.Element)}{sizeStr}]";
|
||||
if (type.BaseType == BaseType.Vector)
|
||||
return $"[{GetName(schema, idx, type.Element)}]";
|
||||
return $"[{GetName(schema, idx, type.Element)}{sizeStr}]";
|
||||
if (type.BaseType == BaseType.Obj)
|
||||
return $"{schema.Objects[idx].Name}";
|
||||
if (!force)
|
||||
@@ -200,9 +203,9 @@ private static string ToFBS(this Type type, Schema schema, int index, bool force
|
||||
|
||||
var baseType = type.BaseType;
|
||||
if (baseType is BaseType.Array)
|
||||
return $"[{GetName(type.Element)}]";
|
||||
return $"[{GetName(type.Element)}{sizeStr}]";
|
||||
if (baseType is BaseType.Vector)
|
||||
return $"[{GetName(type.Element)}]";
|
||||
return $"[{GetName(type.Element)}{sizeStr}]";
|
||||
|
||||
var x = GetName(baseType);
|
||||
if (type.Element != BaseType.None)
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FlatSharp.Runtime" Version="7.2.3" />
|
||||
<PackageReference Include="FlatSharp.Compiler" Version="7.2.3">
|
||||
<PackageReference Include="FlatSharp.Runtime" Version="7.3.0" />
|
||||
<PackageReference Include="FlatSharp.Compiler" Version="7.3.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
||||
26
pkNX.Structures.FlatBuffers.SV/Directory.Build.props
Normal file
26
pkNX.Structures.FlatBuffers.SV/Directory.Build.props
Normal file
@@ -0,0 +1,26 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<NeutralLanguage>en</NeutralLanguage>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FlatSharp.Runtime" Version="7.3.0" />
|
||||
<PackageReference Include="FlatSharp.Compiler" Version="7.3.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<FlatSharpDeserializers>GreedyMutable</FlatSharpDeserializers>
|
||||
<FlatSharpInputFilesOnly>true</FlatSharpInputFilesOnly>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<FlatSharpSchema Include="Schemas\**\*.fbs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="Schemas\**\*.fbs" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,9 +0,0 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
public partial struct PackedVec2f
|
||||
{
|
||||
public override string ToString() => $"{{ X: {X}, Y: {Y} }}";
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
public partial struct PackedVec3f : IEquatable<PackedVec3f>
|
||||
{
|
||||
public override string ToString() => $"{{ X: {X}, Y: {Y}, Z: {Z} }}";
|
||||
|
||||
public static readonly PackedVec3f Zero = new();
|
||||
public static readonly PackedVec3f One = new(1, 1, 1);
|
||||
|
||||
public PackedVec3f() { }
|
||||
|
||||
public PackedVec3f(float x = 0, float y = 0, float z = 0)
|
||||
{
|
||||
X = x;
|
||||
Y = y;
|
||||
Z = z;
|
||||
}
|
||||
public static implicit operator Vec3f(PackedVec3f v) => new(v.X, v.Y, v.Z);
|
||||
|
||||
public bool IsOne => X is 1 && Y is 1 && Z is 1;
|
||||
public bool IsZero => X is 0 && Y is 0 && Z is 0;
|
||||
|
||||
public float Magnitude => MathF.Sqrt(MagnitudeSqr);
|
||||
public float MagnitudeSqr => Dot(this);
|
||||
public PackedVec3f Normalized() => this * (1 / Magnitude);
|
||||
|
||||
public float Dot(PackedVec3f other) => X * other.X + Y * other.Y + Z * other.Z;
|
||||
public PackedVec3f Cross(PackedVec3f other) => new(Y * other.Z - Z * other.Y, Z * other.X - X * other.Z, X * other.Y - Y * other.X);
|
||||
public float DistanceTo(PackedVec3f other) => (this - other).Magnitude;
|
||||
public float DistanceToSqr(PackedVec3f other) => (this - other).MagnitudeSqr;
|
||||
public PackedVec3f Lerp(PackedVec3f other, float t) => this + (other - this) * t;
|
||||
|
||||
public PackedVec3f Clone() => new()
|
||||
{
|
||||
X = X,
|
||||
Y = Y,
|
||||
Z = Z,
|
||||
};
|
||||
|
||||
public override bool Equals(object? obj) => obj is PackedVec3f other && Equals(other);
|
||||
public bool Equals(PackedVec3f other) => X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z);
|
||||
public override int GetHashCode() => HashCode.Combine(X, Y, Z);
|
||||
|
||||
public static PackedVec3f operator -(PackedVec3f v) => new(-v.X, -v.Y, -v.Z);
|
||||
|
||||
public static PackedVec3f operator +(PackedVec3f l, PackedVec3f r) => new(l.X + r.X, l.Y + r.Y, l.Z + r.Z);
|
||||
public static PackedVec3f operator -(PackedVec3f l, PackedVec3f r) => new(l.X - r.X, l.Y - r.Y, l.Z - r.Z);
|
||||
public static PackedVec3f operator *(PackedVec3f l, PackedVec3f r) => new(l.X * r.X, l.Y * r.Y, l.Z * r.Z);
|
||||
public static PackedVec3f operator /(PackedVec3f l, PackedVec3f r) => new(l.X / r.X, l.Y / r.Y, l.Z / r.Z);
|
||||
|
||||
public static PackedVec3f operator +(PackedVec3f l, float r) => new(l.X + r, l.Y + r, l.Z + r);
|
||||
public static PackedVec3f operator -(PackedVec3f l, float r) => new(l.X - r, l.Y - r, l.Z - r);
|
||||
public static PackedVec3f operator *(PackedVec3f l, float r) => new(l.X * r, l.Y * r, l.Z * r);
|
||||
public static PackedVec3f operator /(PackedVec3f l, float r) => new(l.X / r, l.Y / r, l.Z / r);
|
||||
|
||||
public static bool operator ==(PackedVec3f? left, PackedVec3f? right) => Equals(left, right);
|
||||
public static bool operator !=(PackedVec3f? left, PackedVec3f? right) => !Equals(left, right);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
public partial struct PackedVec4f
|
||||
{
|
||||
public PackedVec4f() { }
|
||||
|
||||
public PackedVec4f(float x = 0, float y = 0, float z = 0, float w = 0)
|
||||
{
|
||||
X = x;
|
||||
Y = y;
|
||||
Z = z;
|
||||
W = w;
|
||||
}
|
||||
|
||||
public override string ToString() => $"{{ X: {X}, Y: {Y}, Z: {Z}, W: {W} }}";
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
public partial class Transform
|
||||
{
|
||||
public override string ToString() => $"{{ S: {Scale}, R: {Rotate}, T: {Translate} }}";
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
public partial class Vec2f
|
||||
{
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
public partial class Vec3f : IEquatable<Vec3f>
|
||||
{
|
||||
public static readonly Vec3f Zero = new(0, 0, 0);
|
||||
public static readonly Vec3f One = new(1, 1, 1);
|
||||
|
||||
|
||||
public Vec3f(float x = 0, float y = 0, float z = 0)
|
||||
{
|
||||
X = x;
|
||||
Y = y;
|
||||
Z = z;
|
||||
}
|
||||
|
||||
public static implicit operator Vec3f(PackedVec3f v) => new(v.X, v.Y, v.Z);
|
||||
|
||||
public bool IsOne => X is 1 && Y is 1 && Z is 1;
|
||||
public bool IsZero => X is 0 && Y is 0 && Z is 0;
|
||||
|
||||
public float Magnitude => MathF.Sqrt(MagnitudeSqr);
|
||||
public float MagnitudeSqr => Dot(this);
|
||||
public Vec3f Normalized() => this * (1 / Magnitude);
|
||||
|
||||
public float Dot(Vec3f other) => X * other.X + Y * other.Y + Z * other.Z;
|
||||
public Vec3f Cross(Vec3f other) => new(Y * other.Z - Z * other.Y, Z * other.X - X * other.Z, X * other.Y - Y * other.X);
|
||||
public float DistanceTo(Vec3f other) => (this - other).Magnitude;
|
||||
public float DistanceToSqr(Vec3f other) => (this - other).MagnitudeSqr;
|
||||
public Vec3f Lerp(Vec3f other, float t) => this + (other - this) * t;
|
||||
|
||||
public Vec3f Clone() => new()
|
||||
{
|
||||
X = X,
|
||||
Y = Y,
|
||||
Z = Z,
|
||||
};
|
||||
|
||||
public override string ToString() => $"V3f({X}, {Y}, {Z})";
|
||||
public string ToTriple() => $"({X}, {Y}, {Z})";
|
||||
|
||||
public bool Equals(Vec3f? other)
|
||||
{
|
||||
if (other is null) return false;
|
||||
if (ReferenceEquals(this, other)) return true;
|
||||
return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z);
|
||||
}
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
if (obj is null) return false;
|
||||
if (ReferenceEquals(this, obj)) return true;
|
||||
if (obj.GetType() != GetType()) return false;
|
||||
return Equals((Vec3f)obj);
|
||||
}
|
||||
|
||||
public override int GetHashCode() => HashCode.Combine(X, Y, Z);
|
||||
|
||||
public static Vec3f operator -(Vec3f v) => new(-v.X, -v.Y, -v.Z);
|
||||
|
||||
public static Vec3f operator +(Vec3f l, Vec3f r) => new(l.X + r.X, l.Y + r.Y, l.Z + r.Z);
|
||||
public static Vec3f operator -(Vec3f l, Vec3f r) => new(l.X - r.X, l.Y - r.Y, l.Z - r.Z);
|
||||
public static Vec3f operator *(Vec3f l, Vec3f r) => new(l.X * r.X, l.Y * r.Y, l.Z * r.Z);
|
||||
public static Vec3f operator /(Vec3f l, Vec3f r) => new(l.X / r.X, l.Y / r.Y, l.Z / r.Z);
|
||||
|
||||
public static Vec3f operator +(Vec3f l, float r) => new(l.X + r, l.Y + r, l.Z + r);
|
||||
public static Vec3f operator -(Vec3f l, float r) => new(l.X - r, l.Y - r, l.Z - r);
|
||||
public static Vec3f operator *(Vec3f l, float r) => new(l.X * r, l.Y * r, l.Z * r);
|
||||
public static Vec3f operator /(Vec3f l, float r) => new(l.X / r, l.Y / r, l.Z / r);
|
||||
|
||||
public static bool operator ==(Vec3f? left, Vec3f? right) => Equals(left, right);
|
||||
public static bool operator !=(Vec3f? left, Vec3f? right) => !Equals(left, right);
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
attribute "fs_valueStruct";
|
||||
|
||||
struct PackedVec2f (fs_valueStruct) {
|
||||
X:float;
|
||||
Y:float;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
attribute "fs_valueStruct";
|
||||
|
||||
struct PackedVec3f (fs_valueStruct) {
|
||||
X:float;
|
||||
Y:float;
|
||||
Z:float;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
attribute "fs_valueStruct";
|
||||
|
||||
struct PackedVec4f (fs_valueStruct) {
|
||||
X:float;
|
||||
Y:float;
|
||||
Z:float;
|
||||
W:float;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
include "PackedVec3f.fbs";
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
|
||||
table Transform {
|
||||
Scale:PackedVec3f;
|
||||
Rotate:PackedVec3f;
|
||||
Translate:PackedVec3f;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
|
||||
table Vec3f {
|
||||
X:float;
|
||||
Y:float;
|
||||
Z:float;
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
include "BGMEventType.fbs";
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
attribute "fs_serializer";
|
||||
|
||||
// Root Type: gfl.audio.fb.BGMEventArray
|
||||
table BGMEvent {
|
||||
EventName:string (required);
|
||||
@@ -8,6 +10,9 @@ table BGMEvent {
|
||||
LayerName:string (required);
|
||||
WwiseEventName:string (required);
|
||||
}
|
||||
|
||||
table BGMEventArray (fs_serializer) {
|
||||
Table:[BGMEvent] (required);
|
||||
}
|
||||
|
||||
root_type BGMEventArray;
|
||||
@@ -1,4 +1,5 @@
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
|
||||
enum BGMEventType : int {
|
||||
Set = 0,
|
||||
Play = 1,
|
||||
@@ -1,5 +1,6 @@
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
attribute "fs_serializer";
|
||||
|
||||
// Root Type: titan_audio.fb.EnvPokeVoiceLotterySetting
|
||||
table EnvPokeVoiceLotterySetting (fs_serializer) {
|
||||
LotteryTimer:float;
|
||||
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\pkNX.Structures.FlatBuffers.SV.Shared\pkNX.Structures.FlatBuffers.SV.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<FlatSharpSchema Include="Schemas\**\*.fbs">
|
||||
<IncludePath>..\pkNX.Structures.FlatBuffers.SV.Shared\Schemas\</IncludePath>
|
||||
</FlatSharpSchema>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,43 @@
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
|
||||
attribute "fs_vector";
|
||||
attribute "fs_serializer";
|
||||
attribute "fs_valueStruct";
|
||||
attribute "fs_nonVirtual";
|
||||
attribute "fs_unsafeStructVector";
|
||||
|
||||
enum DifficultyId : ubyte {
|
||||
Easy = 0,
|
||||
Normal = 1,
|
||||
Hard = 2,
|
||||
}
|
||||
|
||||
struct RewardDangoNums (fs_valueStruct) {
|
||||
Value:[byte:4];
|
||||
}
|
||||
|
||||
struct GameBaseParam {
|
||||
TimeLimit:ubyte;
|
||||
PlayerHoldFruitsMax:ubyte;
|
||||
DifficultyLevelMax:[ubyte:3];
|
||||
BaseFruitsNeedNum:ubyte;
|
||||
AdjustMemberNums:[float:4];
|
||||
RoarDistance:float;
|
||||
RoarAngle:float;
|
||||
RoarBaseFrontPos:float;
|
||||
RoarRangeType:ubyte;
|
||||
BalloonAutoRepopTime:float;
|
||||
CountupAnimeSeconds:float;
|
||||
SeOblationResetSeconds:float;
|
||||
RewardDangoNumsAtDifficulty:[RewardDangoNums:3];
|
||||
}
|
||||
|
||||
table GameBaseParamTable {
|
||||
Param:GameBaseParam;
|
||||
}
|
||||
|
||||
table GameBaseParamTableArray (fs_serializer) {
|
||||
Table:[GameBaseParamTable] (required);
|
||||
}
|
||||
|
||||
root_type GameBaseParamTableArray;
|
||||
@@ -0,0 +1,24 @@
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
|
||||
attribute "fs_vector";
|
||||
attribute "fs_serializer";
|
||||
attribute "fs_valueStruct";
|
||||
attribute "fs_nonVirtual";
|
||||
attribute "fs_unsafeStructVector";
|
||||
|
||||
struct OjamaPokemonCommonParam {
|
||||
PopRateBase:ubyte;
|
||||
PopRateAdd:ubyte;
|
||||
OblationPopTimingMin:ubyte;
|
||||
OblationPopTimingMax:ubyte;
|
||||
}
|
||||
|
||||
table OjamaPokemonCommonTable {
|
||||
Param:OjamaPokemonCommonParam;
|
||||
}
|
||||
|
||||
table OjamaPokemonCommonTableArray (fs_serializer) {
|
||||
Table:[OjamaPokemonCommonTable] (required);
|
||||
}
|
||||
|
||||
root_type OjamaPokemonCommonTableArray;
|
||||
@@ -0,0 +1,26 @@
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
|
||||
attribute "fs_vector";
|
||||
attribute "fs_serializer";
|
||||
attribute "fs_valueStruct";
|
||||
attribute "fs_nonVirtual";
|
||||
attribute "fs_unsafeStructVector";
|
||||
|
||||
struct OjamaPokemonUniqueParam (fs_valueStruct) {
|
||||
EatCount:ubyte;
|
||||
Type:ubyte;
|
||||
TargetRadius:float;
|
||||
StartEatSeconds:float;
|
||||
EatLimitNum:ushort;
|
||||
PopRatePerLevel:[ubyte:10];
|
||||
}
|
||||
|
||||
table OjamaPokemonUniqueTable {
|
||||
Param:OjamaPokemonUniqueParam;
|
||||
}
|
||||
|
||||
table OjamaPokemonUniqueTableArray (fs_serializer) {
|
||||
Table:[OjamaPokemonUniqueTable] (required);
|
||||
}
|
||||
|
||||
root_type OjamaPokemonUniqueTableArray;
|
||||
@@ -0,0 +1,37 @@
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
|
||||
attribute "fs_vector";
|
||||
attribute "fs_serializer";
|
||||
attribute "fs_valueStruct";
|
||||
attribute "fs_nonVirtual";
|
||||
attribute "fs_unsafeStructVector";
|
||||
|
||||
struct ResultDemoTransform {
|
||||
PosX:float;
|
||||
PosY:float;
|
||||
PosZ:float;
|
||||
RotX:float;
|
||||
RotY:float;
|
||||
RotZ:float;
|
||||
IsToRadian:bool;
|
||||
}
|
||||
|
||||
struct ResultDemoParam {
|
||||
BaseTransformList:[ResultDemoTransform:6];
|
||||
}
|
||||
|
||||
table ResultDemoTable {
|
||||
Param:ResultDemoParam;
|
||||
PokeObjName0:string;
|
||||
PokeObjName1:string;
|
||||
PokeObjName2:string;
|
||||
PokeObjName3:string;
|
||||
PokeObjName4:string;
|
||||
PokeObjName5:string;
|
||||
}
|
||||
|
||||
table ResultDemoTableArray (fs_serializer) {
|
||||
Table:[ResultDemoTable] (required);
|
||||
}
|
||||
|
||||
root_type ResultDemoTableArray;
|
||||
@@ -0,0 +1,32 @@
|
||||
include "Shared/ItemID.fbs";
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
attribute "fs_vector";
|
||||
attribute "fs_serializer";
|
||||
attribute "fs_valueStruct";
|
||||
attribute "fs_nonVirtual";
|
||||
attribute "fs_unsafeStructVector";
|
||||
|
||||
|
||||
struct RewardActionItemParam {
|
||||
ItemId:ItemID;
|
||||
Rate:ubyte;
|
||||
}
|
||||
|
||||
struct RewardActionParam {
|
||||
ActionRewardRate:ubyte;
|
||||
LotteryCrashBalloonCountRate:ubyte;
|
||||
LotteryOblationCountRate:ubyte;
|
||||
RemainTimeRewardRate:ubyte;
|
||||
RewardItems:[RewardActionItemParam:57];
|
||||
}
|
||||
|
||||
table RewardActionTable {
|
||||
Param:RewardActionParam (required);
|
||||
}
|
||||
|
||||
table RewardActionTableArray (fs_serializer) {
|
||||
Table:[RewardActionTable] (required);
|
||||
}
|
||||
|
||||
root_type RewardActionTableArray;
|
||||
@@ -0,0 +1,29 @@
|
||||
include "Shared/ItemID.fbs";
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV.Balloon;
|
||||
|
||||
attribute "fs_vector";
|
||||
attribute "fs_serializer";
|
||||
attribute "fs_valueStruct";
|
||||
attribute "fs_nonVirtual";
|
||||
attribute "fs_unsafeStructVector";
|
||||
|
||||
struct RewardLevelItemParam {
|
||||
ItemId:ItemID;
|
||||
Num:ubyte;
|
||||
}
|
||||
|
||||
struct RewardLevelParam {
|
||||
RewardItems:[RewardLevelItemParam:6];
|
||||
DifficultyRating:[ubyte:3];
|
||||
}
|
||||
|
||||
table RewardTable {
|
||||
Param:RewardLevelParam (required);
|
||||
}
|
||||
|
||||
table RewardTableArray (fs_serializer) {
|
||||
Table:[RewardTable] (required);
|
||||
}
|
||||
|
||||
root_type RewardTableArray;
|
||||
@@ -0,0 +1,24 @@
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
|
||||
attribute "fs_vector";
|
||||
attribute "fs_serializer";
|
||||
attribute "fs_valueStruct";
|
||||
attribute "fs_nonVirtual";
|
||||
attribute "fs_unsafeStructVector";
|
||||
|
||||
struct ScoreBaseParam {
|
||||
OblationPoint:uint;
|
||||
CrashBalloonPoint:uint;
|
||||
LevelClearPoint:uint;
|
||||
RemainTimePoint:uint;
|
||||
}
|
||||
|
||||
table ScoreBaseTable {
|
||||
Param:ScoreBaseParam;
|
||||
}
|
||||
|
||||
table ScoreBaseTableArray (fs_serializer) {
|
||||
Table:[ScoreBaseTable] (required);
|
||||
}
|
||||
|
||||
root_type ScoreBaseTableArray;
|
||||
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\pkNX.Structures.FlatBuffers.SV.Shared\pkNX.Structures.FlatBuffers.SV.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<FlatSharpSchema Include="Schemas\**\*.fbs">
|
||||
<IncludePath>..\pkNX.Structures.FlatBuffers.SV.Shared\Schemas\</IncludePath>
|
||||
</FlatSharpSchema>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,4 +1,4 @@
|
||||
include "../Geometry/Vec3f.fbs";
|
||||
include "Math/Vec3f.fbs";
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
attribute "fs_serializer";
|
||||
@@ -1,4 +1,4 @@
|
||||
include "../Shared/BattleType.fbs";
|
||||
include "Shared/BattleType.fbs";
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
attribute "fs_serializer";
|
||||
@@ -1,4 +1,4 @@
|
||||
include "../Shared/DevID.fbs";
|
||||
include "Shared/DevID.fbs";
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
attribute "fs_serializer";
|
||||
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\pkNX.Structures.FlatBuffers.SV.Shared\pkNX.Structures.FlatBuffers.SV.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<FlatSharpSchema Include="Schemas\**\*.fbs">
|
||||
<IncludePath>..\pkNX.Structures.FlatBuffers.SV.Shared\Schemas\;..\..\pkNX.Structures.FlatBuffers\Schemas\</IncludePath>
|
||||
</FlatSharpSchema>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,5 +1,5 @@
|
||||
include "../Cooking/Enums/FoodSkillType.fbs";
|
||||
include "../Shared/MoveType.fbs";
|
||||
include "Enums/FoodSkillType.fbs";
|
||||
include "Shared/MoveType.fbs";
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
attribute "fs_serializer";
|
||||
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\pkNX.Structures.FlatBuffers.SV.Shared\pkNX.Structures.FlatBuffers.SV.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<FlatSharpSchema Include="Schemas\**\*.fbs">
|
||||
<IncludePath>..\pkNX.Structures.FlatBuffers.SV.Shared\Schemas\</IncludePath>
|
||||
</FlatSharpSchema>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,4 +1,4 @@
|
||||
include "../PokeData/PokeDataFull.fbs";
|
||||
include "PokeData/PokeDataFull.fbs";
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
attribute "fs_serializer";
|
||||
@@ -1,4 +1,4 @@
|
||||
include "../Shared/ItemID.fbs";
|
||||
include "Shared/ItemID.fbs";
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV.EventSub012;
|
||||
attribute "fs_serializer";
|
||||
@@ -1,4 +1,4 @@
|
||||
include "../Shared/DevID.fbs";
|
||||
include "Shared/DevID.fbs";
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include "../PokeData/PokeDataTrade.fbs";
|
||||
include "PokeData/PokeDataTrade.fbs";
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
attribute "fs_serializer";
|
||||
@@ -1,5 +1,5 @@
|
||||
include "../Shared/DevID.fbs";
|
||||
include "../Shared/SexType.fbs";
|
||||
include "Shared/DevID.fbs";
|
||||
include "Shared/SexType.fbs";
|
||||
include "Motion/NpcTrafficPartnerType.fbs";
|
||||
include "Motion/FieldNpcFaceType.fbs";
|
||||
include "Motion/NpcTrafficFormation.fbs";
|
||||
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\pkNX.Structures.FlatBuffers.SV.Shared\pkNX.Structures.FlatBuffers.SV.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<FlatSharpSchema Include="Schemas\**\*.fbs">
|
||||
<IncludePath>..\pkNX.Structures.FlatBuffers.SV.Shared\Schemas\</IncludePath>
|
||||
</FlatSharpSchema>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,4 +1,4 @@
|
||||
include "../Shared/ItemID.fbs";
|
||||
include "Shared/ItemID.fbs";
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
attribute "fs_valueStruct";
|
||||
@@ -1,4 +1,4 @@
|
||||
include "../Shared/ItemID.fbs";
|
||||
include "Shared/ItemID.fbs";
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
attribute "fs_serializer";
|
||||
@@ -1,5 +1,5 @@
|
||||
include "ExerciseSetting.fbs";
|
||||
include "../Shared/ItemID.fbs";
|
||||
include "Shared/ItemID.fbs";
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
attribute "fs_serializer";
|
||||
@@ -1,4 +1,4 @@
|
||||
include "../Shared/ItemID.fbs";
|
||||
include "Shared/ItemID.fbs";
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV.Gym;
|
||||
attribute "fs_serializer";
|
||||
@@ -1,5 +1,5 @@
|
||||
include "../Shared/DevID.fbs";
|
||||
include "../Shared/ItemID.fbs";
|
||||
include "Shared/DevID.fbs";
|
||||
include "Shared/ItemID.fbs";
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
attribute "fs_serializer";
|
||||
@@ -1,4 +1,4 @@
|
||||
include "../Shared/ItemID.fbs";
|
||||
include "Shared/ItemID.fbs";
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
attribute "fs_serializer";
|
||||
@@ -1,4 +1,4 @@
|
||||
include "../Shared/ItemID.fbs";
|
||||
include "Shared/ItemID.fbs";
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
attribute "fs_serializer";
|
||||
@@ -1,4 +1,4 @@
|
||||
include "../Shared/ItemID.fbs";
|
||||
include "Shared/ItemID.fbs";
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
attribute "fs_serializer";
|
||||
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\pkNX.Structures.FlatBuffers.SV.Shared\pkNX.Structures.FlatBuffers.SV.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<FlatSharpSchema Include="Schemas\**\*.fbs">
|
||||
<IncludePath>..\pkNX.Structures.FlatBuffers.SV.Shared\Schemas\</IncludePath>
|
||||
</FlatSharpSchema>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,17 +1,17 @@
|
||||
include "../Shared/DevID.fbs";
|
||||
include "../Shared/ItemID.fbs";
|
||||
include "../Shared/SexType.fbs";
|
||||
include "../Shared/TokuseiType.fbs";
|
||||
include "../Shared/GemType.fbs";
|
||||
include "../Shared/RareType.fbs";
|
||||
include "../Shared/SizeType.fbs";
|
||||
include "../Shared/TalentType.fbs";
|
||||
include "../Shared/SeikakuType.fbs";
|
||||
include "../Shared/BallType.fbs";
|
||||
include "Shared/DevID.fbs";
|
||||
include "Shared/ItemID.fbs";
|
||||
include "Shared/SexType.fbs";
|
||||
include "Shared/TokuseiType.fbs";
|
||||
include "Shared/GemType.fbs";
|
||||
include "Shared/RareType.fbs";
|
||||
include "Shared/SizeType.fbs";
|
||||
include "Shared/TalentType.fbs";
|
||||
include "Shared/SeikakuType.fbs";
|
||||
include "Shared/BallType.fbs";
|
||||
|
||||
include "../Entity/ParamSet.fbs";
|
||||
include "../PokeData/WazaSet.fbs";
|
||||
include "../Waza/WazaType.fbs";
|
||||
include "Entity/ParamSet.fbs";
|
||||
include "PokeData/WazaSet.fbs";
|
||||
include "Shared/WazaType.fbs";
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
attribute "fs_serializer";
|
||||
@@ -1,5 +1,5 @@
|
||||
include "../Shared/ItemID.fbs";
|
||||
include "../Shared/DevID.fbs";
|
||||
include "Shared/ItemID.fbs";
|
||||
include "Shared/DevID.fbs";
|
||||
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
attribute "fs_serializer";
|
||||
@@ -1,4 +1,5 @@
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
|
||||
enum EquipEffect : int {
|
||||
SOUBI_NONE = 0,
|
||||
SOUBI_HPKAIHUKU = 1,
|
||||
@@ -1,4 +1,5 @@
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
|
||||
enum FieldFunctionType : int {
|
||||
FIELDFUNC_NONE = 0,
|
||||
FIELDFUNC_RECOVER = 1,
|
||||
@@ -1,4 +1,5 @@
|
||||
namespace pkNX.Structures.FlatBuffers.SV;
|
||||
|
||||
enum FieldPocket : int {
|
||||
FPOCKET_DRUG = 0,
|
||||
FPOCKET_BALL = 1,
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user