mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
starting to add object interface
This commit is contained in:
parent
1ba130f3bf
commit
0bd99e71bd
|
@ -6,6 +6,7 @@ use video::Video;
|
|||
|
||||
pub mod bitmap3;
|
||||
pub mod bitmap4;
|
||||
pub mod object;
|
||||
pub mod tiled0;
|
||||
pub mod vblank;
|
||||
pub mod video;
|
||||
|
|
12
src/display/object.rs
Normal file
12
src/display/object.rs
Normal file
|
@ -0,0 +1,12 @@
|
|||
#[non_exhaustive]
|
||||
pub struct Object {}
|
||||
|
||||
impl Object {
|
||||
pub(crate) fn new() -> Self {
|
||||
Object {}
|
||||
}
|
||||
|
||||
pub fn enable(&mut self) {}
|
||||
|
||||
pub fn disable(&mut self) {}
|
||||
}
|
|
@ -3,7 +3,8 @@ use core::convert::TryInto;
|
|||
use crate::memory_mapped::MemoryMapped1DArray;
|
||||
|
||||
use super::{
|
||||
set_graphics_mode, set_graphics_settings, DisplayMode, GraphicsSettings, DISPLAY_CONTROL,
|
||||
object::Object, set_graphics_mode, set_graphics_settings, DisplayMode, GraphicsSettings,
|
||||
DISPLAY_CONTROL,
|
||||
};
|
||||
|
||||
const PALETTE_BACKGROUND: MemoryMapped1DArray<u16, 256> =
|
||||
|
@ -101,6 +102,7 @@ pub struct Tiled0 {
|
|||
pub background_1: Background,
|
||||
pub background_2: Background,
|
||||
pub background_3: Background,
|
||||
pub object: Object,
|
||||
}
|
||||
|
||||
impl Tiled0 {
|
||||
|
@ -112,6 +114,7 @@ impl Tiled0 {
|
|||
background_1: Background { layer: 1 },
|
||||
background_2: Background { layer: 2 },
|
||||
background_3: Background { layer: 3 },
|
||||
object: Object::new(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue