Code commit

This commit is contained in:
RisaDev
2024-01-06 01:21:41 +03:00
parent a7d7297c59
commit a486dd2c96
90 changed files with 11576 additions and 0 deletions

View File

@@ -0,0 +1,82 @@
using FFXIVClientStructs.Havok;
namespace CustomizePlus.Core.Data;
internal static class Constants
{
/// <summary>
/// Version of the configuration file, when increased a converter should be implemented if necessary.
/// </summary>
public const int ConfigurationVersion = 4;
/// <summary>
/// The name of the root bone.
/// </summary>
public const string RootBoneName = "n_root";
/// <summary>
/// Minimum allowed value for any of the vector values.
/// </summary>
public const int MinVectorValueLimit = -512;
/// <summary>
/// Maximum allowed value for any of the vector values.
/// </summary>
public const int MaxVectorValueLimit = 512;
/// <summary>
/// Predicate function for determining if the given object table index represents an
/// NPC in a busy area (i.e. there are ~245 other objects already).
/// </summary>
public static bool IsInObjectTableBusyNPCRange(int index) => index > 245;
/// <summary>
/// A "null" havok vector. Since the type isn't inherently nullable, and the default value (0, 0, 0, 0)
/// is valid input in a lot of cases, we can use this instead.
/// </summary>
public static readonly hkVector4f NullVector = new()
{
X = float.NaN,
Y = float.NaN,
Z = float.NaN,
W = float.NaN
};
/// <summary>
/// A "null" havok quaternion. Since the type isn't inherently nullable, and the default value (0, 0, 0, 0)
/// is valid input in a lot of cases, we can use this instead.
/// </summary>
public static readonly hkQuaternionf NullQuaternion = new()
{
X = float.NaN,
Y = float.NaN,
Z = float.NaN,
W = float.NaN
};
/// <summary>
/// A "null" havok transform. Since the type isn't inherently nullable, and the default values
/// aren't immediately obviously wrong, we can use this instead.
/// </summary>
public static readonly hkQsTransformf NullTransform = new()
{
Translation = NullVector,
Rotation = NullQuaternion,
Scale = NullVector
};
/// <summary>
/// The pose at index 0 is the only one we apparently need to care about.
/// </summary>
public const int TruePoseIndex = 0;
/// <summary>
/// Main render hook address
/// </summary>
public const string RenderHookAddress = "E8 ?? ?? ?? ?? 48 81 C3 ?? ?? ?? ?? BF ?? ?? ?? ?? 33 ED";
/// <summary>
/// Movement hook address, used for position offset and other changes which cannot be done in main hook
/// </summary>
public const string MovementHookAddress = "E8 ?? ?? ?? ?? EB 29 48 8B 5F 08";
}