rosu_memory_lib/reader/beatmap/stable/
offset.rs

1use crate::reader::beatmap::common::BeatmapLocationOffset;
2use crate::reader::beatmap::common::BeatmapMetadataOffset;
3use crate::reader::beatmap::common::BeatmapOffset;
4use crate::reader::beatmap::common::BeatmapStatsOffset;
5use crate::reader::beatmap::common::BeatmapTechnicalOffset;
6
7pub(crate) const BEATMAP_LOCATION_OFFSET: BeatmapLocationOffset = BeatmapLocationOffset {
8    folder: 0x78,
9    filename: 0x90,
10    audio: 0x64,
11    cover: 0x68,
12};
13
14pub(crate) const BEATMAP_STATS_OFFSET: BeatmapStatsOffset = BeatmapStatsOffset {
15    ar: 0x2c,
16    cs: 0x30,
17    hp: 0x34,
18    od: 0x38,
19    object_count: 0xf8,
20    total_length: 0x134,
21    drain_time: 0x0,  // TODO
22    star_rating: 0x0, // TODO
23    slider_count: 0x146,
24};
25
26pub(crate) const BEATMAP_TECHNICAL_OFFSET: BeatmapTechnicalOffset = BeatmapTechnicalOffset {
27    md5: 0x6c,
28    id: 0xc8,
29    set_id: 0xcc,
30    mode: 0x11c,
31    ranked_status: 0x12c,
32};
33
34pub(crate) const BEATMAP_OFFSET: BeatmapOffset = BeatmapOffset {
35    ptr: 0xC,
36    metadata: BEATMAP_METADATA_OFFSET,
37    location: BEATMAP_LOCATION_OFFSET,
38    stats: BEATMAP_STATS_OFFSET,
39    technical: BEATMAP_TECHNICAL_OFFSET,
40};
41
42pub(crate) const BEATMAP_METADATA_OFFSET: BeatmapMetadataOffset = BeatmapMetadataOffset {
43    author: 0x18,
44    creator: 0x7C,
45    title_romanized: 0x24,
46    title_original: 0x28,
47    difficulty: 0xAC,
48    tags: 0x20,
49};
50
51// 0x12a Could be draintime ->