#define SIMPLE_KEYBOARD_LAYER using SharpPluginLoader.Core.Configuration; using SharpPluginLoader.Core.IO; namespace MHWNewCamera { internal class Config : IConfig { public struct Settings { public const float DEFAULT_SPEED = 5.25f; public const float DEFAULT_SPEED_MODIFIER = 0.40f; public const float DEFAULT_SENSITIVITY = 0.045f; public const float DEFAULT_ZOOM_SPEED = 0.02f; public const double DEFAULT_PITCH_LIMIT = -1.0; public const double MAX_PITCH_LIMIT = 89.95; public const int DEFAULT_DEADZONE = 4750; public Settings() { CameraSpeed = DEFAULT_SPEED; CameraSpeedModifier = DEFAULT_SPEED_MODIFIER; CameraSensitivity = DEFAULT_SENSITIVITY; CameraZoomSpeed = DEFAULT_ZOOM_SPEED; CameraPitchLimit = DEFAULT_PITCH_LIMIT; StickDeadzone = DEFAULT_DEADZONE; } public float CameraSpeed { get; set; } public float CameraSpeedModifier { get; set; } public float CameraSensitivity { get; set; } public float CameraZoomSpeed { get; set; } public double CameraPitchLimit { get; set; } public int StickDeadzone { get; set; } } public struct Preset { public double FOV { get; set; } public float Forward { get; set; } public float Right { get; set; } public float Up { get; set; } public double Roll { get; set; } public bool DisableFading { get; set; } } public struct SavedPosition { public float PosX { get; set; } public float PosY { get; set; } public float PosZ { get; set; } public float TargetX { get; set; } public float TargetY { get; set; } public float TargetZ { get; set; } public double Roll { get; set; } } public String Name => "MHWNewCamera"; public String Version => "3.1"; private static Dictionary buttonMap = new Dictionary { { "r1", Button.R1 }, { "rb", Button.R1 }, { "r2", Button.R2 }, { "rt", Button.R2 }, { "r3", Button.R3 }, { "rstick", Button.R3 }, { "l1", Button.L1 }, { "lb", Button.L1 }, { "l2", Button.L2 }, { "lt", Button.L2 }, { "l3", Button.L3 }, { "lstick", Button.L3 }, { "a", Button.Cross }, { "cross", Button.Cross }, { "b", Button.Circle }, { "circle", Button.Circle }, { "x", Button.Square }, { "square", Button.Square }, { "y", Button.Triangle }, { "triangle", Button.Triangle }, { "start", Button.Options }, { "options", Button.Options }, { "select", Button.Share }, { "share", Button.Share }, { "up", Button.Up }, { "down", Button.Down }, { "left", Button.Left }, { "right", Button.Right } }; public static Button[]? ParseCombo(String comboString) { string[] buttonStrings = comboString.Split(","); if (buttonStrings.Length == 2) { string b1 = buttonStrings[0].ToLower(); string b2 = buttonStrings[1].ToLower(); if (buttonMap.ContainsKey(b1) && buttonMap.ContainsKey(b2)) { return [ buttonMap[b1], buttonMap[b2] ]; } } return null; } public bool DisableMod { get; set; } = false; #if SIMPLE_KEYBOARD_LAYER public bool EnableKeyboard { get; set; } = true; public int KeyboardLookSensitivity { get; set; } = 19750; #endif public bool EnableCombo { get; set; } = true; public String FreeCameraCombo { get; set; } = "RStick,LT"; public bool DisableComboButton1UnlessButton2Held { get; set; } = false; public Settings CameraSettings { get; set; } = new Settings(); public bool PerspectiveCameraEnabled { get; set; } = false; public Dictionary Presets { get; set; } = new Dictionary(); public String Selected { get; set; } = ""; public Dictionary Positions { get; set; } = new Dictionary(); public bool TripleShadowResolution { get; set; } = false; public float ShadowRangeOffset { get; set; } = 0.5f; public bool ApplyShadowRange { get; set; } = false; public float ShadowRadiusOffset { get; set; } = 0.0005f; public bool ApplyShadowRadius { get; set; } = false; public bool HigherShadowDetailInHoarfrost { get; set; } = false; public bool DisableLodLimits { get; set; } = false; public bool ApplyLodFactors { get; set; } = false; public float FoliageLodBias { get; set; } = 3.0f; public float TerrainLodBias { get; set; } = 6.0f; public float FoliageLodFactor { get; set; } = 0.0f; public float TerrainLodFactor { get; set; } = 0.0f; public bool LargerFoliageSwayRange { get; set; } = false; } }