mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
derive some traits on bitflags
This commit is contained in:
parent
09ec6c25b0
commit
8eac033650
|
@ -35,6 +35,7 @@ pub(crate) const DISPLAY_STATUS: MemoryMapped<u16> = unsafe { MemoryMapped::new(
|
||||||
const VCOUNT: MemoryMapped<u16> = unsafe { MemoryMapped::new(0x0400_0006) };
|
const VCOUNT: MemoryMapped<u16> = unsafe { MemoryMapped::new(0x0400_0006) };
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
|
#[derive(PartialEq, Eq, Hash, Debug, Clone, Copy)]
|
||||||
struct GraphicsSettings: u16 {
|
struct GraphicsSettings: u16 {
|
||||||
const PAGE_SELECT = 1 << 0x4;
|
const PAGE_SELECT = 1 << 0x4;
|
||||||
const OAM_HBLANK = 1 << 0x5;
|
const OAM_HBLANK = 1 << 0x5;
|
||||||
|
|
|
@ -40,6 +40,7 @@ impl From<(bool, bool)> for Tri {
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
/// Represents a button on the GBA
|
/// Represents a button on the GBA
|
||||||
|
#[derive(PartialEq, Eq, Hash, Debug, Clone, Copy)]
|
||||||
pub struct Button: u32 {
|
pub struct Button: u32 {
|
||||||
/// The A button
|
/// The A button
|
||||||
const A = 1 << 0;
|
const A = 1 << 0;
|
||||||
|
|
Loading…
Reference in a new issue