mirror of
https://github.com/italicsjenga/gba.git
synced 2024-12-24 11:11:31 +11:00
minor fixes
This commit is contained in:
parent
e475253dcf
commit
f99da154e8
|
@ -36,9 +36,7 @@ fn main(_argc: isize, _argv: *const *const u8) -> isize {
|
||||||
BG0CNT.write(BackgroundControlSetting::new().with_screen_base_block(8));
|
BG0CNT.write(BackgroundControlSetting::new().with_screen_base_block(8));
|
||||||
// Display Control
|
// Display Control
|
||||||
DISPCNT.write(DisplayControlSetting::new().with_bg0(true));
|
DISPCNT.write(DisplayControlSetting::new().with_bg0(true));
|
||||||
loop {
|
loop {}
|
||||||
// TODO the whole thing
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const ALL_TWOS: Tile4bpp = Tile4bpp([
|
pub const ALL_TWOS: Tile4bpp = Tile4bpp([
|
||||||
|
|
|
@ -286,7 +286,7 @@ impl<T> VolAddressBlock<T> {
|
||||||
if slot < self.slots {
|
if slot < self.slots {
|
||||||
unsafe { self.vol_address.offset(slot as isize) }
|
unsafe { self.vol_address.offset(slot as isize) }
|
||||||
} else {
|
} else {
|
||||||
panic!("Index Requested: {} >= Bound: {}", slot, self.slots)
|
panic!("Index Requested: {} >= Slot Count: {}", slot, self.slots)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,10 +13,12 @@ pub const KEYINPUT: VolAddress<u16> = unsafe { VolAddress::new_unchecked(0x400_0
|
||||||
/// A "tribool" value helps us interpret the arrow pad.
|
/// A "tribool" value helps us interpret the arrow pad.
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||||
#[repr(i32)]
|
#[repr(i32)]
|
||||||
#[allow(missing_docs)]
|
|
||||||
pub enum TriBool {
|
pub enum TriBool {
|
||||||
|
/// -1
|
||||||
Minus = -1,
|
Minus = -1,
|
||||||
|
/// +0
|
||||||
Neutral = 0,
|
Neutral = 0,
|
||||||
|
/// +1
|
||||||
Plus = 1,
|
Plus = 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ impl OBJAttr0 {
|
||||||
multi_bits!(
|
multi_bits!(
|
||||||
u16,
|
u16,
|
||||||
[
|
[
|
||||||
(0, 8, y_coordinate),
|
(0, 8, row_coordinate),
|
||||||
(8, 2, obj_rendering, ObjectRender, Normal, Affine, Disabled, DoubleAreaAffine),
|
(8, 2, obj_rendering, ObjectRender, Normal, Affine, Disabled, DoubleAreaAffine),
|
||||||
(10, 2, obj_mode, ObjectMode, Normal, SemiTransparent, OBJWindow),
|
(10, 2, obj_mode, ObjectMode, Normal, SemiTransparent, OBJWindow),
|
||||||
(14, 2, obj_shape, ObjectShape, Square, Horizontal, Vertical),
|
(14, 2, obj_shape, ObjectShape, Square, Horizontal, Vertical),
|
||||||
|
@ -86,7 +86,7 @@ impl OBJAttr1 {
|
||||||
multi_bits!(
|
multi_bits!(
|
||||||
u16,
|
u16,
|
||||||
[
|
[
|
||||||
(0, 9, x_coordinate),
|
(0, 9, col_coordinate),
|
||||||
(9, 5, affine_index),
|
(9, 5, affine_index),
|
||||||
(14, 2, obj_size, ObjectSize, Zero, One, Two, Three),
|
(14, 2, obj_size, ObjectSize, Zero, One, Two, Three),
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue