public AiReportOneObject(HitObjectBase h,int time, BeenCorrectedDelegate corrected, Severity severity, string information, int weblink)
     : base(time, severity, information, weblink, corrected)
 {
     this.h1 = h;
     
     RelatedHitObjects.Add(h);
 }
        public AiReportOneObject(HitObjectBase h, BeenCorrectedDelegate corrected, Severity severity, string information, int weblink, GameMode Mode = GameMode.All)
            : base(h.StartTime, severity, information, weblink, corrected, Mode)
        {
            this.h1 = h;

            RelatedHitObjects.Add(h);
        }
		// Token: 0x0600175E RID: 5982
		// RVA: 0x0007310C File Offset: 0x0007130C
		public AiReportTwoObjects(HitObjectBase h1, HitObjectBase h2, BeenCorrectedDelegate corrected, Severity severity, string information, int weblink) : base((h1.EndTime - h2.StartTime) / 2 + h2.StartTime, severity, information, weblink, corrected)
		{
			this.h1 = h1;
			this.h2 = h2;
			this.RelatedHitObjects.Add(h1);
			this.RelatedHitObjects.Add(h2);
		}
Exemple #4
0
 /// <summary>
 /// For circles. Checks for start time snapping only.
 /// </summary>
 /// <param name="currentHitObject"></param>
 private void testNormalSnap(HitObjectBase currentHitObject)
 {
     int startTime = currentHitObject.StartTime;
     if (!isSnapped(startTime))
     {
         Reports.Add(SnappingReport(startTime, "Circle isn't snapped."));
     }
 }
Exemple #5
0
 /// <summary>
 /// For spinners. Checks for start and end time snapping.
 /// </summary>
 /// <param name="currentHitObject"></param>
 private void testSpinnerSnap(HitObjectBase currentHitObject)
 {
     int startTime = currentHitObject.StartTime;
     int endTime = currentHitObject.EndTime;
     if (!isSnapped(startTime))
     {
         Reports.Add(SnappingReport(startTime, "Spinner isn't snapped."));
     }
     else if (!isSnapped(endTime))
     {
         Reports.Add(SnappingReport(startTime, "Spinner's end isn't snapped."));
     }
 }
Exemple #6
0
 /// <summary>
 /// For sliders. Checks for start, repeats, and end time snapping.
 /// </summary>
 /// <param name="currentHitObject"></param>
 private void testSliderSnap(HitObjectBase currentHitObject)
 {
     int startTime = currentHitObject.StartTime;
     int endTime = currentHitObject.EndTime;
     if (!isSnapped(startTime))
     {
         Reports.Add(SnappingReport(startTime, "Slider isn't snapped."));
     }
     //TODO for each repeat, if repeat isn't snapped...
     else if (!isSnapped(endTime))
     {
         Reports.Add(SnappingReport(startTime, "Slider's end isn't snapped."));
     }
 }
 public AiReportDifficultyTwoObjects(BeatmapDifficulty difficulty, string condition, HitObjectBase h1, HitObjectBase h2)
     : base(h1, h2, null, Severity.Info, difficulty + " criteria: " + condition, 0)
 {
 }
 public AiReportDifficultyOneObject(BeatmapDifficulty difficulty, string condition, HitObjectBase h1)
     : base(h1,h1.StartTime, null, Severity.Info, difficulty + " criteria: " + condition,0)
 {
 }
 public AiReportDifficultyOneObject(BeatmapDifficulty difficulty, string condition, HitObjectBase h1, GameMode Mode = GameMode.All)
     : base(h1, null, Severity.Info, difficulty + " criteria: " + condition,0)
 {
 }
        public tpHitObject(HitObjectBase BaseHitObject, float CircleRadius)
        {
            this.BaseHitObject = BaseHitObject;

            // We will scale everything by this factor, so we can assume a uniform CircleSize among beatmaps.
            float ScalingFactor = (52.0f / CircleRadius);
            NormalizedStartPosition = BaseHitObject.Position * ScalingFactor;

            // Calculate approximation of lazy movement on the slider
            if ((BaseHitObject.Type & HitObjectType.Slider) > 0)
            {
                float SliderFollowCircleRadius = CircleRadius * 3; // Not sure if this is correct, but here we do not need 100% exact values. This comes pretty darn close in my tests.

                int SegmentLength = BaseHitObject.Length / BaseHitObject.SegmentCount;
                int SegmentEndTime = BaseHitObject.StartTime + SegmentLength;

                // For simplifying this step we use actual osu! coordinates and simply scale the length, that we obtain by the ScalingFactor later
                Vector2 CursorPos = BaseHitObject.Position; //

                // Actual computation of the first lazy curve
                for (int Time = BaseHitObject.StartTime + LAZY_SLIDER_STEP_LENGTH; Time < SegmentEndTime; Time += LAZY_SLIDER_STEP_LENGTH)
                {
                    Vector2 Difference = BaseHitObject.PositionAtTime(Time) - CursorPos;
                    float Distance = Difference.Length();

                    // Did we move away too far?
                    if (Distance > SliderFollowCircleRadius)
                    {
                        // Yep, we need to move the cursor
                        Difference.Normalize(); // Obtain the direction of difference. We do no longer need the actual difference
                        Distance -= SliderFollowCircleRadius;
                        CursorPos += Difference * Distance; // We move the cursor just as far as needed to stay in the follow circle
                        LazySliderLengthFirst += Distance;
                    }
                }

                LazySliderLengthFirst *= ScalingFactor;
                // If we have an odd amount of repetitions the current position will be the end of the slider. Note that this will -always- be triggered if
                // BaseHitObject.SegmentCount <= 1, because BaseHitObject.SegmentCount can not be smaller than 1. Therefore NormalizedEndPosition will always be initialized
                if (BaseHitObject.SegmentCount % 2 == 1)
                {
                    NormalizedEndPosition = CursorPos * ScalingFactor;
                }

                // If we have more than one segment, then we also need to compute the length ob subsequent lazy curves. They are different from the first one, since the first
                // one starts right at the beginning of the slider.
                if(BaseHitObject.SegmentCount > 1)
                {
                    // Use the next segment
                    SegmentEndTime += SegmentLength;

                    for (int Time = SegmentEndTime - SegmentLength + LAZY_SLIDER_STEP_LENGTH; Time < SegmentEndTime; Time += LAZY_SLIDER_STEP_LENGTH)
                    {
                        Vector2 Difference = BaseHitObject.PositionAtTime(Time) - CursorPos;
                        float Distance = Difference.Length();

                        // Did we move away too far?
                        if (Distance > SliderFollowCircleRadius)
                        {
                            // Yep, we need to move the cursor
                            Difference.Normalize(); // Obtain the direction of difference. We do no longer need the actual difference
                            Distance -= SliderFollowCircleRadius;
                            CursorPos += Difference * Distance; // We move the cursor just as far as needed to stay in the follow circle
                            LazySliderLengthSubsequent += Distance;
                        }
                    }

                    LazySliderLengthSubsequent *= ScalingFactor;
                    // If we have an even amount of repetitions the current position will be the end of the slider
                    if (BaseHitObject.SegmentCount % 2 == 1)
                    {
                        NormalizedEndPosition = CursorPos * ScalingFactor;
                    }
                }
            }
            // We have a normal HitCircle or a spinner
            else
            {
                NormalizedEndPosition = BaseHitObject.EndPosition * ScalingFactor;
            }
        }