rosu_memory_lib/reader/resultscreen/
mod.rs

1pub mod common;
2pub mod stable;
3use crate::impl_osu_accessor;
4use crate::reader::common::GameMode;
5use crate::reader::common::OsuClientKind;
6use crate::reader::resultscreen::common::ResultScreenInfo;
7use crate::reader::structs::Hit;
8use crate::reader::structs::State;
9use crate::Error;
10use rosu_mem::process::Process;
11pub struct ResultScreenReader<'a> {
12    pub process: &'a Process,
13    pub state: &'a mut State,
14    pub osu_type: OsuClientKind,
15}
16
17impl<'a> ResultScreenReader<'a> {
18    pub fn new(p: &'a Process, state: &'a mut State, osu_type: OsuClientKind) -> Self {
19        Self {
20            process: p,
21            state,
22            osu_type,
23        }
24    }
25    impl_osu_accessor! {
26        fn username() -> String => stable::memory::username,
27        fn score() -> i32 => stable::memory::score,
28        fn mode() -> GameMode => stable::memory::mode,
29        fn max_combo() -> i16 => stable::memory::max_combo,
30        fn hits() -> Hit => stable::memory::hits,
31        fn hits_300() -> i16 => stable::memory::hits_300,
32        fn hits_100() -> i16 => stable::memory::hits_100,
33        fn hits_50() -> i16 => stable::memory::hits_50,
34        fn hits_miss() -> i16 => stable::memory::hits_miss,
35        fn hits_geki() -> i16 => stable::memory::hits_geki,
36        fn hits_katu() -> i16 => stable::memory::hits_katu,
37        fn accuracy() -> f64 => stable::memory::accuracy,
38        fn info() -> ResultScreenInfo => stable::memory::info,
39    }
40}