@@ -9,7 +9,7 @@ use core::ops::{Index, IndexMut};
99
1010use arbitrary_int:: { u3, u5} ;
1111
12- use crate :: cartridge:: { CHR_ROM_SIZE , Cartridge , Orientation } ;
12+ use crate :: cartridge:: { CHR_ROM_SIZE , Cartridge , MirrorMode } ;
1313use crate :: ppu:: registers:: { CtrlBits , Loopy , MaskBits , StatusBits } ;
1414use crate :: ppu:: video:: { COLORS , Rgb8 } ;
1515use crate :: util;
@@ -31,7 +31,7 @@ pub struct Ppu {
3131 regs : Registers ,
3232 data_buffer : u8 ,
3333 second_write : bool ,
34- nmtable_mirroring : Orientation ,
34+ nmtable_mirroring : MirrorMode ,
3535 scanline : u32 ,
3636 dot : u32 ,
3737 odd_frame : bool ,
@@ -664,7 +664,7 @@ impl Ppu {
664664}
665665
666666/// Returns (name table 0 or 1, address of cell inside the name table).
667- fn nmtable_indices ( mirroring : Orientation , addr : u16 ) -> ( usize , usize ) {
667+ fn nmtable_indices ( mirroring : MirrorMode , addr : u16 ) -> ( usize , usize ) {
668668 const TABLE_1_START : u16 = 0x2000 ;
669669 const TABLE_2_START : u16 = 0x2400 ;
670670 const TABLE_3_START : u16 = 0x2800 ;
@@ -675,15 +675,15 @@ fn nmtable_indices(mirroring: Orientation, addr: u16) -> (usize, usize) {
675675 TABLE_1_START ..TABLE_2_START => ( 0 , usize:: from ( addr - TABLE_1_START ) ) ,
676676 TABLE_2_START ..TABLE_3_START => (
677677 match mirroring {
678- Orientation :: Horizontal => 0 ,
679- Orientation :: Vertical => 1 ,
678+ MirrorMode :: Horizontal => 0 ,
679+ MirrorMode :: Vertical => 1 ,
680680 } ,
681681 usize:: from ( addr - TABLE_2_START ) ,
682682 ) ,
683683 TABLE_3_START ..TABLE_4_START => (
684684 match mirroring {
685- Orientation :: Horizontal => 1 ,
686- Orientation :: Vertical => 0 ,
685+ MirrorMode :: Horizontal => 1 ,
686+ MirrorMode :: Vertical => 0 ,
687687 } ,
688688 usize:: from ( addr - TABLE_3_START ) ,
689689 ) ,
0 commit comments