public DelayTimer(Int32 calibration, Int32 targetDelay, Int32 targetSecond, Consoles.ConsoleType consoleType, Int32 minLength, Boolean initialize = true) : base(calibration, targetSecond, consoleType, minLength, false) { TargetDelay = targetDelay; if (initialize) { Initialize(); } }
public SimpleTimer(Int32 calibration, Int32 targetSecond, Consoles.ConsoleType consoleType, Int32 minLength, Boolean initialize = true) { Calibration = calibration; TargetSecond = targetSecond; ConsoleType = consoleType; MinimumLength = minLength; if (initialize) { Initialize(); } }
public FrameTimer(Int32 calibration, Int32 pretimer, Int32 targetFrame, Consoles.ConsoleType consoleType) { Calibration = calibration; PretimerLength = pretimer; TargetFrame = targetFrame; ConsoleType = consoleType; Stages = new List <TimeSpan>(); for (Int32 i = 0; GetStage(i) != TimerConstants.NULL_TIMESPAN; i++) { Stages.Add(GetStage(i)); } }
/// <summary> /// Converts milliseconds to delays /// </summary> /// <param name="millis">Milliseconds to be converted</param> /// <param name="type">The console type</param> /// <returns>Delays</returns> public static Int32 ConvertToDelays(Int32 millis, Consoles.ConsoleType type) { switch (type) { case Consoles.ConsoleType.GBA: return((Int32)Math.Round(millis / TimerConstants.FRAMERATE_GBA)); case Consoles.ConsoleType.NDS: return((Int32)Math.Round(millis / TimerConstants.FRAMERATE_NDS)); case Consoles.ConsoleType.DSI: return((Int32)Math.Round(millis / TimerConstants.FRAMERATE_DSI)); case Consoles.ConsoleType._3DS: return((Int32)Math.Round(millis / TimerConstants.FRAMERATE_3DS)); default: return(0); } }
public EnhancedEntralinkTimer(Int32 calibration, Int32 secondaryCalibration, Int32 targetDelay, Int32 targetSecond, Int32 targetFrame, Int32 frameCalibration, Consoles.ConsoleType consoleType, Int32 minLength, Boolean initialize = true) : base(calibration, secondaryCalibration, targetDelay, targetSecond, consoleType, minLength, false) { TargetFrame = targetFrame; NPCCount = 0; InitialAdvances = 0; FrameCalibration = frameCalibration; if (initialize) { Initialize(); } }
public VariableTargetFrameTimer(Consoles.ConsoleType consoleType) { ConsoleType = consoleType; TargetFrame = -1; PrepareStages(); }
public static Int32 CreateCalibration(Int32 delay, Int32 second, Consoles.ConsoleType type) { var delayCalibration = delay - ConvertToDelays(second * 1000, type); return(ConvertToMillis(delayCalibration, type)); }
public EntralinkTimer(Int32 calibration, Int32 secondaryCalibration, Int32 targetDelay, Int32 targetSecond, Consoles.ConsoleType consoleType, Int32 minLength, Boolean initialize = true) : base(calibration, targetDelay, targetSecond, consoleType, minLength, false) { SecondaryCalibration = secondaryCalibration; if (initialize) { Initialize(); } }