chore: begin refactor of public api

This commit is contained in:
2021-09-17 23:29:29 -03:00
parent 4516ca8477
commit bcd67cb317
6 changed files with 159 additions and 121 deletions

View File

@@ -418,8 +418,8 @@ impl Ppu {
self.frame_buf.swap_with_slice(&mut blank);
}
pub fn copy_to_gui(&self, frame: &mut [u8]) {
frame.copy_from_slice(self.frame_buf.as_ref());
pub(crate) fn frame_buf(&self) -> &[u8; GB_HEIGHT * GB_WIDTH * 4] {
&self.frame_buf
}
fn clock_fifo(&mut self) -> Option<GrayShade> {