using FFXIVClientStructs.Havok; using System.Numerics; namespace CustomizePlus.Core.Data; internal static class Constants { /// /// Version of the configuration file, when increased a converter should be implemented if necessary. /// public const int ConfigurationVersion = 4; /// /// The name of the root bone. /// public const string RootBoneName = "n_root"; /// /// Minimum allowed value for any of the vector values. /// public const int MinVectorValueLimit = -512; /// /// Maximum allowed value for any of the vector values. /// public const int MaxVectorValueLimit = 512; /// /// 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). /// public static bool IsInObjectTableBusyNPCRange(int index) => index > 245; /// /// 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. /// public static readonly hkVector4f NullVector = new() { X = float.NaN, Y = float.NaN, Z = float.NaN, W = float.NaN }; /// /// 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. /// public static readonly hkQuaternionf NullQuaternion = new() { X = float.NaN, Y = float.NaN, Z = float.NaN, W = float.NaN }; /// /// 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. /// public static readonly hkQsTransformf NullTransform = new() { Translation = NullVector, Rotation = NullQuaternion, Scale = NullVector }; /// /// The pose at index 0 is the only one we apparently need to care about. /// public const int TruePoseIndex = 0; /// /// Main render hook address /// public const string RenderHookAddress = "E8 ?? ?? ?? ?? 48 81 C3 ?? ?? ?? ?? BF ?? ?? ?? ?? 33 ED"; /// /// Movement hook address, used for position offset and other changes which cannot be done in main hook /// public const string MovementHookAddress = "E8 ?? ?? ?? ?? EB 29 48 8B 5F 08"; internal static class Colors { public static Vector4 Normal = new Vector4(1, 1, 1, 1); public static Vector4 Warning = new Vector4(1, 0.5f, 0, 1); public static Vector4 Error = new Vector4(1, 0, 0, 1); } }