Skip to content

Commit

Permalink
General cleanup + refactor
Browse files Browse the repository at this point in the history
+ use meddle colortable def
+ make use of
+ otel stuff / IHost / fix dispose issues / ILogger (pluginlog) wrapper / use system.diagnostics in some places
+ bump cs
+ run formatter on solution
+ performance improvements by caching shpk files
+ performance improvements by using ClientStructs interop cache file
  • Loading branch information
PassiveModding committed Jul 24, 2024
1 parent 75f16eb commit 86048f8
Show file tree
Hide file tree
Showing 44 changed files with 2,154 additions and 1,363 deletions.
14 changes: 7 additions & 7 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ dotnet_naming_symbols.private_static_fields_symbols.applicable_kinds = field
dotnet_naming_symbols.private_static_fields_symbols.required_modifiers = static
dotnet_naming_symbols.private_static_readonly_symbols.applicable_accessibilities = private
dotnet_naming_symbols.private_static_readonly_symbols.applicable_kinds = field
dotnet_naming_symbols.private_static_readonly_symbols.required_modifiers = static,readonly
dotnet_style_parentheses_in_arithmetic_binary_operators =always_for_clarity:suggestion
dotnet_style_parentheses_in_other_binary_operators =always_for_clarity:suggestion
dotnet_naming_symbols.private_static_readonly_symbols.required_modifiers = static, readonly
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:suggestion
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:suggestion
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
dotnet_style_parentheses_in_other_operators=always_for_clarity:silent
dotnet_style_parentheses_in_other_operators = always_for_clarity:silent
dotnet_style_object_initializer = false:suggestion
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_parameter_list_parentheses = false
Expand All @@ -74,7 +74,7 @@ csharp_space_before_comma = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_comma = true
csharp_space_after_cast = false
csharp_space_around_binary_operators = before_and_after
csharp_space_around_binary_operators = before_and_after
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = none
Expand Down Expand Up @@ -129,7 +129,7 @@ resharper_suggest_var_or_type_built_in_types_highlighting = hint
resharper_suggest_var_or_type_elsewhere_highlighting = hint
resharper_suggest_var_or_type_simple_types_highlighting = hint
resharper_unused_auto_property_accessor_global_highlighting = none
csharp_style_deconstructed_variable_declaration=true:silent
csharp_style_deconstructed_variable_declaration = true:silent
csharp_using_directive_placement = outside_namespace:suggestion
csharp_prefer_simple_using_statement = true:suggestion
csharp_prefer_braces = true:silent
Expand Down Expand Up @@ -171,7 +171,7 @@ csharp_style_prefer_extended_property_pattern = true:suggestion
indent_style = space
indent_size = 4
tab_width = 4
dotnet_style_parentheses_in_other_operators=always_for_clarity:silent
dotnet_style_parentheses_in_other_operators = always_for_clarity:silent
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
Expand Down
41 changes: 0 additions & 41 deletions Meddle/Meddle.Plugin/InteropService.cs

This file was deleted.

15 changes: 10 additions & 5 deletions Meddle/Meddle.Plugin/Meddle.Plugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="DalamudPackager" Version="2.1.13" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Vortice.Direct3D11" Version="3.5.0" />
<PackageReference Include="DalamudPackager" Version="2.1.13"/>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0"/>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0"/>
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.9.0"/>
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.9.0"/>
<PackageReference Include="OpenTelemetry.Instrumentation.Process" Version="0.5.0-beta.6"/>
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.9.0"/>
<PackageReference Include="Vortice.Direct3D11" Version="3.5.0"/>
<Reference Include="Dalamud">
<HintPath>$(DalamudLibPath)Dalamud.dll</HintPath>
<Private>false</Private>
Expand All @@ -41,11 +46,11 @@
<Private>False</Private>
</Reference>
<Reference Include="OtterTex">
<HintPath>..\Meddle.Utils\Lib\OtterTex.dll</HintPath>
<HintPath>..\Meddle.Utils\Lib\OtterTex.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Meddle.Utils\Meddle.Utils.csproj" />
<ProjectReference Include="..\Meddle.Utils\Meddle.Utils.csproj"/>
</ItemGroup>
</Project>
22 changes: 13 additions & 9 deletions Meddle/Meddle.Plugin/Meddle.Plugin.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{
"Author": "Ramen",
"Name": "Meddle",
"Punchline": "Did I mention I'm a model? Export models to glTF format.",
"Description": "Export models to glTF format.",
"InternalName": "Meddle",
"ApplicableVersion": "any",
"Tags": ["xande", "model", "exporting"],
"IconUrl": "https://github.com/PassiveModding/Meddle/raw/main/icon.png",
"AssemblyVersion": ""
"Author": "Ramen",
"Name": "Meddle",
"Punchline": "Did I mention I'm a model? Export models to glTF format.",
"Description": "Export models to glTF format.",
"InternalName": "Meddle",
"ApplicableVersion": "any",
"Tags": [
"xande",
"model",
"exporting"
],
"IconUrl": "https://github.com/PassiveModding/Meddle/raw/main/icon.png",
"AssemblyVersion": ""
}
34 changes: 18 additions & 16 deletions Meddle/Meddle.Plugin/Models/CustomizeParameter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,41 @@
namespace Meddle.Plugin.Models;

[StructLayout(LayoutKind.Explicit, Size = 0x90)]
public struct CustomizeParameter {
public struct CustomizeParameter
{
/// <summary>
/// XYZ : Skin diffuse color, as squared RGB.
/// XYZ : Skin diffuse color, as squared RGB.
/// </summary>
[FieldOffset(0x0)]
public Vector3 SkinColor;

[FieldOffset(0xC)]
public float MuscleTone;

[FieldOffset(0x10)]
public Vector4 SkinFresnelValue0;

/// <summary>
/// XYZ : Lip diffuse color, as squared RGB.
/// W : Lip opacity.
/// XYZ : Lip diffuse color, as squared RGB.
/// W : Lip opacity.
/// </summary>
[FieldOffset(0x20)]
public Vector4 LipColor;

/// <summary>
/// XYZ : Hair primary color, as squared RGB.
/// XYZ : Hair primary color, as squared RGB.
/// </summary>
[FieldOffset(0x30)]
public Vector3 MainColor;

[FieldOffset(0x3C)]
public float FacePaintUVMultiplier;

[FieldOffset(0x40)]
public Vector3 HairFresnelValue0;

/// <summary>
/// XYZ : Hair highlight color, as squared RGB.
/// XYZ : Hair highlight color, as squared RGB.
/// </summary>
[FieldOffset(0x50)]
public Vector3 MeshColor;
Expand All @@ -46,20 +47,21 @@ public struct CustomizeParameter {
public float FacePaintUVOffset;

/// <summary>
/// XYZ : Left eye color, as squared RGB.
/// W : Left Eye Limbal Ring Intensity
/// XYZ : Left eye color, as squared RGB.
/// W : Left Eye Limbal Ring Intensity
/// </summary>
[FieldOffset(0x60)]
public Vector4 LeftColor;

/// <summary>
/// XYZ : Right eye color, as squared RGB.
/// W : Right Eye Limbal Ring Intensity
/// XYZ : Right eye color, as squared RGB.
/// W : Right Eye Limbal Ring Intensity
/// </summary>
[FieldOffset(0x70)]
public Vector4 RightColor;

/// <summary>
/// XYZ : Race feature color, as squared RGB.
/// XYZ : Race feature color, as squared RGB.
/// </summary>
[FieldOffset(0x80)]
public Vector3 OptionColor;
Expand Down
Loading

0 comments on commit 86048f8

Please sign in to comment.