-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
125 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#[derive(Default)] | ||
pub struct FrameInfo { | ||
width: usize, | ||
height: usize, | ||
original_width: usize, | ||
original_height: usize, | ||
bits_per_pixel: usize, | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
use crate::ControlManager; | ||
|
||
#[derive(Default)] | ||
pub struct RewindManager {} | ||
|
||
impl RewindManager { | ||
pub fn new() -> Self { | ||
let this = RewindManager::default(); | ||
this | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#[derive(Default)] | ||
pub struct RotateFilter {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#[derive(Default)] | ||
pub struct ScaleFilter {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,76 @@ | ||
use crate::*; | ||
|
||
#[derive(Default)] | ||
pub struct VideoDecoder {} | ||
pub struct ScreenSize { | ||
width: usize, | ||
height: usize, | ||
scale: f64, | ||
} | ||
|
||
#[derive(Default)] | ||
pub struct VideoDecoder { | ||
frame_number: u32, | ||
hud: VideoHud, | ||
pub frame_count: u32, | ||
previous_screen_size: ScreenSize, | ||
previous_scale: f64, | ||
pub frame_info: FrameInfo, | ||
video_filter_type: VideoFilterType, | ||
video_filter: Option<Box<dyn VideoFilter>>, | ||
scale_filter: ScaleFilter, | ||
rotate_filter: RotateFilter, | ||
} | ||
|
||
impl VideoDecoder { | ||
fn update_video_filter(&mut self) { | ||
todo!() | ||
} | ||
|
||
fn decode_thread(&mut self) { | ||
todo!() | ||
} | ||
|
||
pub fn new() -> Self { | ||
let this = VideoDecoder::default(); | ||
this | ||
} | ||
|
||
fn decode_frame(console: &mut Console, synchronous: bool) { | ||
todo!() | ||
// console.rewind_manager.send_frame(); | ||
} | ||
|
||
fn take_screenshot(&mut self) { | ||
todo!() | ||
} | ||
|
||
fn get_screen_size(&self, ignore_scale: bool) -> ScreenSize { | ||
todo!() | ||
} | ||
|
||
pub fn update_frame_sync(console: &mut Console) { | ||
if console.emulation_settings.is_run_ahead_frame { | ||
return; | ||
} | ||
|
||
console.video_decoder.frame_number = console.ppu.frame_count; | ||
VideoDecoder::decode_frame(console, true); | ||
console.video_decoder.frame_count += 1; | ||
} | ||
|
||
fn update_frame(&self, ppu_output_buffer: &mut Vec<u16>) { | ||
todo!() | ||
} | ||
|
||
fn is_running(&self) -> bool { | ||
todo!() | ||
} | ||
|
||
fn start_thread(&mut self) { | ||
todo!() | ||
} | ||
|
||
fn stop_thread(&mut self) { | ||
todo!() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub trait VideoFilter {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#[derive(Default)] | ||
pub struct VideoHud; |