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
#![warn(clippy::all, clippy::pedantic, clippy::nursery, clippy::cargo)]
#![allow(
    clippy::borrow_deref_ref,
    clippy::cast_possible_truncation,
    clippy::cast_possible_wrap,
    clippy::cast_sign_loss,
    clippy::many_single_char_names,
    clippy::missing_panics_doc,
    clippy::must_use_candidate,
    clippy::needless_pass_by_value,
    clippy::new_without_default,
    clippy::redundant_pub_crate,
    clippy::too_many_arguments,
    clippy::too_many_lines,
    clippy::unused_self,
    clippy::use_self,
    clippy::used_underscore_binding,
    clippy::wrong_self_convention,
    clippy::zero_ptr
)]

#[macro_use]
mod utils;
mod audio_wrapper;
mod channel_wrapper;
mod constant_wrapper;
mod graphics_wrapper;
mod image_wrapper;
mod input_wrapper;
mod math_wrapper;
mod music_wrapper;
mod resource_wrapper;
mod sound_wrapper;
mod system_wrapper;
mod tilemap_wrapper;
#[allow(non_snake_case)]
mod variable_wrapper;

use pyo3::prelude::*;

use crate::audio_wrapper::add_audio_functions;
use crate::channel_wrapper::add_channel_class;
use crate::constant_wrapper::add_module_constants;
use crate::graphics_wrapper::add_graphics_functions;
use crate::image_wrapper::add_image_class;
use crate::input_wrapper::add_input_functions;
use crate::math_wrapper::add_math_functions;
use crate::music_wrapper::add_music_class;
use crate::resource_wrapper::add_resource_functions;
use crate::sound_wrapper::add_sound_class;
use crate::system_wrapper::add_system_functions;
use crate::tilemap_wrapper::add_tilemap_class;
use crate::variable_wrapper::add_module_variables;

#[pymodule]
fn pyxel_wrapper(_py: Python, m: &PyModule) -> PyResult<()> {
    add_image_class(m)?;
    add_tilemap_class(m)?;
    add_channel_class(m)?;
    add_sound_class(m)?;
    add_music_class(m)?;

    add_module_constants(m)?;
    add_module_variables(m)?;

    add_system_functions(m)?;
    add_resource_functions(m)?;
    add_input_functions(m)?;
    add_graphics_functions(m)?;
    add_audio_functions(m)?;
    add_math_functions(m)?;

    Ok(())
}