put all the prelude stuff into a single prelude module
i still don't like this
This commit is contained in:
parent
f64bba30d2
commit
c6549e37a9
|
@ -8,8 +8,6 @@ pub mod buffer;
|
|||
pub mod device;
|
||||
pub mod queue;
|
||||
|
||||
pub mod prelude;
|
||||
|
||||
/// The number of simultaneously playing audio channels supported by this library currently.
|
||||
pub const NUM_CHANNELS: usize = 8;
|
||||
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
pub use crate::{
|
||||
//
|
||||
audio::buffer::wav::*,
|
||||
audio::buffer::*,
|
||||
audio::device::*,
|
||||
audio::queue::*,
|
||||
audio::*,
|
||||
};
|
|
@ -6,10 +6,8 @@
|
|||
//!
|
||||
//! Only a subset of the most common Bitmap drawing operations will be provided here.
|
||||
|
||||
use crate::graphics::bitmap::indexed::blit::IndexedBlitMethod;
|
||||
use crate::graphics::bitmap::indexed::IndexedBitmap;
|
||||
use crate::graphics::bitmap::rgb::blit::RgbaBlitMethod;
|
||||
use crate::graphics::bitmap::rgb::RgbaBitmap;
|
||||
use crate::graphics::bitmap::indexed::{IndexedBitmap, IndexedBlitMethod};
|
||||
use crate::graphics::bitmap::rgb::{RgbaBitmap, RgbaBlitMethod};
|
||||
use crate::graphics::bitmap::BitmapError;
|
||||
use crate::graphics::font::{Font, FontRenderOpts};
|
||||
use crate::graphics::Pixel;
|
||||
|
|
|
@ -4,9 +4,13 @@ use crate::graphics::bitmap::rgb::RgbaBitmap;
|
|||
use crate::graphics::bitmap::{Bitmap, BitmapError};
|
||||
use crate::graphics::palette::Palette;
|
||||
|
||||
pub mod blit;
|
||||
pub mod primitives;
|
||||
pub mod triangles;
|
||||
mod blit;
|
||||
mod primitives;
|
||||
mod triangles;
|
||||
|
||||
pub use blit::*;
|
||||
pub use primitives::*;
|
||||
pub use triangles::*;
|
||||
|
||||
pub type IndexedBitmap = Bitmap<u8>;
|
||||
|
||||
|
|
|
@ -5,9 +5,13 @@ use crate::graphics::bitmap::{Bitmap, BitmapError};
|
|||
use crate::graphics::color::{to_argb32, to_rgb32};
|
||||
use crate::graphics::palette::Palette;
|
||||
|
||||
pub mod blit;
|
||||
pub mod primitives;
|
||||
pub mod triangles;
|
||||
mod blit;
|
||||
mod primitives;
|
||||
mod triangles;
|
||||
|
||||
pub use blit::*;
|
||||
pub use primitives::*;
|
||||
pub use triangles::*;
|
||||
|
||||
pub type RgbaBitmap = Bitmap<u32>;
|
||||
|
||||
|
|
|
@ -8,8 +8,6 @@ pub mod color;
|
|||
pub mod font;
|
||||
pub mod palette;
|
||||
|
||||
pub mod prelude;
|
||||
|
||||
/// Common trait to represent single pixel/colour values.
|
||||
pub trait Pixel: PrimInt + Unsigned + Default + Display {}
|
||||
impl<T> Pixel for T where T: PrimInt + Unsigned + Default + Display {}
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
pub use crate::graphics::{
|
||||
//
|
||||
bitmap::{
|
||||
blit::*,
|
||||
general::*,
|
||||
gif::*,
|
||||
iff::*,
|
||||
indexed::{
|
||||
//
|
||||
blit::*,
|
||||
primitives::*,
|
||||
triangles::*,
|
||||
*,
|
||||
},
|
||||
pcx::*,
|
||||
png::*,
|
||||
primitives::*,
|
||||
rgb::{
|
||||
//
|
||||
blit::*,
|
||||
primitives::*,
|
||||
triangles::*,
|
||||
*,
|
||||
},
|
||||
triangles::*,
|
||||
*,
|
||||
},
|
||||
bitmapatlas::*,
|
||||
blendmap::*,
|
||||
color::*,
|
||||
font::*,
|
||||
palette::*,
|
||||
*,
|
||||
};
|
|
@ -5,8 +5,6 @@ pub mod matrix3x3;
|
|||
pub mod rect;
|
||||
pub mod vector2;
|
||||
|
||||
pub mod prelude;
|
||||
|
||||
pub const PI: f32 = std::f32::consts::PI;
|
||||
// 180 degrees
|
||||
pub const HALF_PI: f32 = PI / 2.0;
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
pub use crate::math::{
|
||||
//
|
||||
circle::*,
|
||||
matrix3x3::*,
|
||||
rect::*,
|
||||
vector2::*,
|
||||
*,
|
||||
};
|
|
@ -1,16 +1,52 @@
|
|||
pub use crate::{
|
||||
//
|
||||
audio::prelude::*,
|
||||
audio::{
|
||||
buffer::{wav::*, *},
|
||||
device::*,
|
||||
queue::*,
|
||||
*,
|
||||
},
|
||||
base::*,
|
||||
entities::*,
|
||||
events::*,
|
||||
graphics::prelude::*,
|
||||
math::prelude::*,
|
||||
graphics::{
|
||||
//
|
||||
bitmap::{
|
||||
blit::*, general::*, gif::*, iff::*, indexed::*, pcx::*, png::*, primitives::*, rgb::*, triangles::*, *,
|
||||
},
|
||||
bitmapatlas::*,
|
||||
blendmap::*,
|
||||
color::*,
|
||||
font::*,
|
||||
palette::*,
|
||||
*,
|
||||
},
|
||||
math::{
|
||||
//
|
||||
circle::*,
|
||||
matrix3x3::*,
|
||||
rect::*,
|
||||
vector2::*,
|
||||
*,
|
||||
},
|
||||
states::*,
|
||||
system::{
|
||||
prelude::*,
|
||||
res::{dos_like::*, standard::*},
|
||||
event::*, //
|
||||
input_devices::{
|
||||
keyboard::{codes::*, scancodes::*, *},
|
||||
mouse::{buttons::*, cursor::*, *},
|
||||
*,
|
||||
},
|
||||
res::{dos_like::*, standard::*, *},
|
||||
*,
|
||||
},
|
||||
utils::{
|
||||
//
|
||||
bytes::*,
|
||||
io::*,
|
||||
lzwgif::*,
|
||||
packbits::*,
|
||||
*,
|
||||
},
|
||||
utils::prelude::*,
|
||||
*,
|
||||
};
|
||||
|
|
|
@ -9,7 +9,6 @@ pub mod input_devices;
|
|||
pub mod res;
|
||||
|
||||
mod framebuffer;
|
||||
pub mod prelude;
|
||||
|
||||
fn is_x11_compositor_skipping_problematic() -> bool {
|
||||
/*
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
pub use crate::system::{
|
||||
event::*, //
|
||||
input_devices::{
|
||||
keyboard::{codes::*, scancodes::*, *},
|
||||
mouse::{buttons::*, cursor::*, *},
|
||||
*,
|
||||
},
|
||||
res::*,
|
||||
*,
|
||||
};
|
|
@ -9,8 +9,6 @@ pub mod io;
|
|||
pub mod lzwgif;
|
||||
pub mod packbits;
|
||||
|
||||
pub mod prelude;
|
||||
|
||||
pub fn rnd_value<N: SampleUniform + PartialOrd>(low: N, high: N) -> N {
|
||||
rand::thread_rng().gen_range(low..=high)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue