pub fn new<'n>(display: &'n mut Display) -> Gpu<'n> {

        Gpu { line:                   0,
              htick:                  0,
              mode:                   Mode::Prelude,
              oam:                    [Sprite::new(); 40],
              vram:                   [0xca; 0x2000],
              display:                display,
              enabled:                false,
              window_tile_map:        TileMap::Low,
              window_enabled:         false,
              bg_win_tile_set:        TileSet::Set0,
              bg_tile_map:            TileMap::Low,
              sprite_size:            SpriteSize::Sz8x8,
              sprites_enabled:        false,
              bg_enabled:             false,
              bgp:                    Palette::from_reg(0xff),
              obp0:                   Palette::from_reg(0xff),
              obp1:                   Palette::from_reg(0xff),
              lyc:                    0x00,
              it_vblank:              false,
              iten_lyc:               false,
              iten_prelude:           false,
              iten_vblank:            false,
              iten_hblank:            false,
              lcd_it_status:          LcdItStatus::Inactive,
              scy:                    0,
              scx:                    0,
              wx:                     0,
              wy:                     0,
              line_cache:             [[None; 10]; 144],
        }
    }
/// Create a new Gpu instance.
Create a new Gpu instance.
Create a new Gpu instance .
pub fn new<'n>(display: &'n mut Display) -> Gpu<'n> {
        Gpu { line:                   0,
              htick:                  0,
              mode:                   Mode::Prelude,
              oam:                    [Sprite::new(); 40],
              vram:                   [0xca; 0x2000],
              display:                display,
              enabled:                false,
              window_tile_map:        TileMap::Low,
              window_enabled:         false,
              bg_win_tile_set:        TileSet::Set0,
              bg_tile_map:            TileMap::Low,
              sprite_size:            SpriteSize::Sz8x8,
              sprites_enabled:        false,
              bg_enabled:             false,
              bgp:                    Palette::from_reg(0xff),
              obp0:                   Palette::from_reg(0xff),
              obp1:                   Palette::from_reg(0xff),
              lyc:                    0x00,
              it_vblank:              false,
              iten_lyc:               false,
              iten_prelude:           false,
              iten_vblank:            false,
              iten_hblank:            false,
              lcd_it_status:          LcdItStatus::Inactive,
              scy:                    0,
              scx:                    0,
              wx:                     0,
              wy:                     0,
              line_cache:             [[None; 10]; 144],
        }
    }
pub fn new < ' n > ( display : & ' n mut Display ) -> Gpu < ' n > { Gpu { line : 0 , htick : 0 , mode : Mode :: Prelude , oam : [ Sprite :: new ( ) ; 40 ] , vram : [ 0xca ; 0x2000 ] , display : display , enabled : false , window_tile_map : TileMap :: Low , window_enabled : false , bg_win_tile_set : TileSet :: Set0 , bg_tile_map : TileMap :: Low , sprite_size : SpriteSize :: Sz8x8 , sprites_enabled : false , bg_enabled : false , bgp : Palette :: from_reg ( 0xff ) , obp0 : Palette :: from_reg ( 0xff ) , obp1 : Palette :: from_reg ( 0xff ) , lyc : 0x00 , it_vblank : false , iten_lyc : false , iten_prelude : false , iten_vblank : false , iten_hblank : false , lcd_it_status : LcdItStatus :: Inactive , scy : 0 , scx : 0 , wx : 0 , wy : 0 , line_cache : [ [ None ; 10 ] ; 144 ] , } }
Create a new Gpu instance.
Create a new Gpu instance .
display
&'n mut Display
display
&'n mut Display