1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#![doc = include_str!("../README.md")]
#![feature(
    cfg_eval,
    doc_cfg,
    doc_auto_cfg,
    option_result_contains,
    option_get_or_insert_default,
    once_cell,
    try_blocks,
    yeet_expr
)]
#![allow(clippy::too_many_arguments, clippy::type_complexity)]
#![warn(
    unused_qualifications,
    unused_import_braces,
    unused_extern_crates,
    rustdoc::broken_intra_doc_links,
    //missing_docs,
    rustdoc::missing_crate_level_docs,
    trivial_casts,
    trivial_numeric_casts,
    unreachable_pub
)]
#![deny(keyword_idents, macro_use_extern_crate, non_ascii_idents)]

#[cfg(not(any(feature = "rs3", feature = "osrs", feature = "legacy")))]
compile_error!("You must use one and only one of the rs3 or osrs or legacy features");

#[cfg(any(feature = "rs3", feature = "osrs", feature = "legacy"))]
pub mod cli;

/// Various data types
#[cfg(any(feature = "rs3", feature = "osrs", feature = "legacy"))]
pub mod types {
    pub mod coordinate;
    /// Player variables
    pub mod variables;
}

/// Entities that can be deserialized from cache data.
#[cfg(any(feature = "rs3", feature = "osrs", feature = "legacy"))]
pub mod definitions {
    /// Configurations of Achievements
    #[cfg(feature = "rs3")]
    pub mod achievements;

    pub mod dbrows;

    #[cfg(feature = "legacy")]
    pub mod flo;

    /// Configuration of game locations.
    pub mod location_configs;

    /// Describes the id, position, type and rotation of game objects.
    pub mod locations;

    pub mod indextype;

    pub mod item_configs;

    /// Configuration of npcs.
    pub mod npc_configs;

    /// Describes the position and id of npcs.
    pub mod npcs;

    pub mod maplabel_configs;

    /// Configuration of images drawn on the world map.
    /// Describes text, sprites and polygons drawn on the map.
    #[cfg(any(feature = "rs3", feature = "2009_1_shim"))]
    pub mod mapscenes;

    pub mod mapsquares;

    #[cfg(feature = "rs3")]
    pub mod music;

    /// Describes the colours of tiles.
    #[cfg(any(feature = "rs3", feature = "osrs"))]
    pub mod overlays;
    /// Images displayed by the game client.
    pub mod sprites;

    pub mod enums;
    pub mod structs;
    #[cfg(feature = "osrs")]
    pub mod textures;

    /// Describes the properties of game surface tiles.
    pub mod tiles;
    /// Describes the ground colours of tiles.
    #[cfg(any(feature = "rs3", feature = "osrs"))]
    pub mod underlays;

    pub mod varbit_configs;

    #[cfg(feature = "rs3")]
    pub mod worldmaps;
}

/// Functions for rendering the map.
#[cfg(all(not(target_arch = "wasm32"), any(feature = "rs3", feature = "osrs", feature = "legacy")))]
pub mod renderers {
    /// Exports map tiles.
    pub mod map;

    pub mod scale;

    /// Creates successive tiles for different zoom levels,
    /// for use with a [leaflet.js](https://leafletjs.com/) based map.
    pub mod zoom;
}

/// Contains structures that are used in multiple different configs.
#[cfg(any(feature = "rs3", feature = "osrs", feature = "legacy"))]
pub mod structures {
    /// A mapping of keys to properties.
    pub mod paramtable;
}

/// Foreign function interfaces to `rs3cache`.
#[cfg(any(feature = "rs3", feature = "osrs", feature = "legacy"))]
pub mod ffi {
    pub mod python;
}

pub mod impl_;