protected override double GetRecommendedSize()
 {
     return(WatchVariableSpecialUtilities.GetMarioSlidingSpeed());
 }
Ejemplo n.º 2
0
        public static (string, Func <string>) CreateGetterFunction(string specialType)
        {
            string        name           = DEFAULT_NAME;
            Func <string> getterFunction = DEFAULT_GETTER;

            switch (specialType)
            {
            case "RngIndex":
                name           = "Index " + VarHackConfig.EscapeChar;
                getterFunction = () =>
                {
                    return(RngIndexer.GetRngIndex().ToString());
                };
                break;

            case "FloorYNorm":
                name           = "YNorm " + VarHackConfig.EscapeChar;
                getterFunction = () =>
                {
                    uint  triFloorAddress = Config.Stream.GetUInt(MarioConfig.StructAddress + MarioConfig.FloorTriangleOffset);
                    float yNorm           = Config.Stream.GetFloat(triFloorAddress + TriangleOffsetsConfig.NormY);
                    return(FormatDouble(yNorm, 4, true));
                };
                break;

            case "DefactoSpeed":
                name           = "Defacto " + VarHackConfig.EscapeChar;
                getterFunction = () =>
                {
                    return(FormatInteger(WatchVariableSpecialUtilities.GetMarioDeFactoSpeed()));
                };
                break;

            case "SlidingSpeed":
                name           = "Spd " + VarHackConfig.EscapeChar;
                getterFunction = () =>
                {
                    return(FormatInteger(WatchVariableSpecialUtilities.GetMarioSlidingSpeed()));
                };
                break;

            case "MarioAction":
                name           = "Action " + VarHackConfig.EscapeChar;
                getterFunction = () =>
                {
                    return(TableConfig.MarioActions.GetActionName());
                };
                break;

            case "MarioAnimation":
                name           = "Animation " + VarHackConfig.EscapeChar;
                getterFunction = () =>
                {
                    return(TableConfig.MarioAnimations.GetAnimationName());
                };
                break;

            case "DYawIntendFacing":
                name           = "DYaw " + VarHackConfig.EscapeChar;
                getterFunction = () =>
                {
                    return(FormatInteger(WatchVariableSpecialUtilities.GetDeltaYawIntendedFacing()));
                };
                break;

            case "DYawIntendFacingHau":
                name           = "DYaw " + VarHackConfig.EscapeChar;
                getterFunction = () =>
                {
                    return(FormatInteger(WatchVariableSpecialUtilities.GetDeltaYawIntendedFacing() / 16));
                };
                break;

            default:
                break;
            }

            return(name, getterFunction);
        }