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
/*!
The resource management system for the ratatosk game engine.

# Example

```
use lazy_static::lazy_static;
use rask_engine::resources::registry;
# use rask_engine::resources::*;

lazy_static! {
    static ref TABLE: ResourceTable = unsafe { ResourceTable::new() };
}

fn test() {
    unsafe {
        let _texture: &Texture = TABLE.get(registry::EMPTY).unwrap();
    }
}
```
*/

pub mod character;
pub mod registry;
mod resource_table;
pub mod sound;
pub mod texture;

#[doc(inline)]
pub use character::Character;
#[doc(inline)]
pub use registry::RESOURCE_COUNT;
#[doc(inline)]
pub use resource_table::{GetStore, GetTextures, ResourceTable};
#[doc(inline)]
pub use sound::Sound;
#[doc(inline)]
pub use texture::{Texture, TextureIds, TextureRange};

#[cfg_attr(not(feature = "nightly"), repr(C))]
pub enum Resource {
    None,
    Character(Box<Character>),
    Texture(Texture),
    Sound(Sound),
}