public Oppai.pp_calc GetIfFcPP(ModsInfo mods, int n300, int n100, int n50, OsuPlayMode mode) { bool need_update = false; need_update = need_update || _fc_n100 != n100; need_update = need_update || _fc_n50 != n50; if (need_update) { _fc_n100 = n100; _fc_n50 = n50; Oppai.rtpp_params args; args.combo = Oppai.FULL_COMBO; args.mods = (uint)mods.Mod; args.n100 = n100; args.n50 = n50; args.nmiss = 0; args.mode = (uint)mode; Oppai.get_ppv2(Beatmap.RawData, (uint)Beatmap.RawData.Length, ref args, true, m_cache, ref _fc_result); } return(_fc_result); }
public pp_calc GetMaxPP(ModsInfo mods, OsuPlayMode mode) { bool need_update = false; need_update = need_update || mods != _max_mods; if (need_update) { _max_mods = mods; Oppai.rtpp_params args; args.combo = Oppai.FULL_COMBO; args.mods = (uint)mods.Mod; args.n100 = 0; args.n50 = 0; args.nmiss = 0; args.mode = (uint)mode; //Cache Beatmap Oppai.get_ppv2(Beatmap.RawData, (uint)Beatmap.RawData.Length, ref args, false, m_cache, ref _max_result); } return(_max_result); }
public Oppai.pp_calc GetRealTimePP(int end_time, ModsInfo mods, int n100, int n50, int nmiss, int max_combo, OsuPlayMode mode) { int pos = GetPosition(end_time, out int nobject); bool need_update = false; need_update = need_update || _pos != pos; need_update = need_update || _n100 != n100; need_update = need_update || _n50 != n50; need_update = need_update || _nmiss != nmiss; need_update = need_update || _max_combo != max_combo; if (need_update) { _pos = pos; _n100 = n100; _n50 = n50; _nmiss = nmiss; _max_combo = max_combo; Oppai.rtpp_params args; args.combo = max_combo; args.mods = (uint)mods.Mod; args.n100 = n100; args.n50 = n50; args.nmiss = nmiss; args.mode = (uint)mode; if (!Oppai.get_ppv2(Beatmap.RawData, (uint)pos, ref args, false, m_real_time_data, ref _rtpp_result)) { return(Oppai.pp_calc.Empty); } } return(_rtpp_result); }