mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
use struct newtypes
This commit is contained in:
parent
cae71ff249
commit
7ad160e30f
|
@ -75,7 +75,7 @@ pub struct Display {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
pub struct ObjectDistribution {}
|
pub struct ObjectDistribution;
|
||||||
|
|
||||||
impl ObjectDistribution {
|
impl ObjectDistribution {
|
||||||
pub fn get(&mut self) -> ObjectController {
|
pub fn get(&mut self) -> ObjectController {
|
||||||
|
@ -84,7 +84,7 @@ impl ObjectDistribution {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
pub struct WindowDist {}
|
pub struct WindowDist;
|
||||||
|
|
||||||
impl WindowDist {
|
impl WindowDist {
|
||||||
pub fn get(&mut self) -> Windows {
|
pub fn get(&mut self) -> Windows {
|
||||||
|
@ -104,6 +104,9 @@ impl BlendDist {
|
||||||
impl Display {
|
impl Display {
|
||||||
pub(crate) const unsafe fn new() -> Self {
|
pub(crate) const unsafe fn new() -> Self {
|
||||||
Display {
|
Display {
|
||||||
|
video: Video,
|
||||||
|
object: ObjectDistribution,
|
||||||
|
window: WindowDist,
|
||||||
blend: BlendDist,
|
blend: BlendDist,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ use super::{
|
||||||
///
|
///
|
||||||
/// Most games will use tiled modes, as bitmap modes are too slow to run at the full 60 FPS.
|
/// Most games will use tiled modes, as bitmap modes are too slow to run at the full 60 FPS.
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
pub struct Video {}
|
pub struct Video;
|
||||||
|
|
||||||
impl Video {
|
impl Video {
|
||||||
/// Bitmap mode that provides a 16-bit colour framebuffer
|
/// Bitmap mode that provides a 16-bit colour framebuffer
|
||||||
|
|
Loading…
Reference in a new issue