minor fixes

This commit is contained in:
Lokathor 2018-12-27 23:22:48 -07:00
parent e475253dcf
commit f99da154e8
4 changed files with 7 additions and 7 deletions

View file

@ -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([

View file

@ -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)
} }
} }

View file

@ -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,
} }

View file

@ -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),
] ]