position windows and allow ignore obj_size

This commit is contained in:
Alex Janka 2023-02-06 12:17:58 +11:00
parent 805ae0c817
commit 56e2735e58
2 changed files with 9 additions and 2 deletions

View file

@ -260,7 +260,7 @@ fn main() {
// let buffer: Vec<u32> = ;
let window = Window::new(
let mut window = Window::new(
"Gameboy",
WIDTH * FACTOR,
HEIGHT * FACTOR,
@ -270,6 +270,8 @@ fn main() {
panic!("{}", e);
});
window.set_position(50, 50);
window.topmost(true);
let rom: ROM = fs::read(args.rom).expect("Could not load ROM");

View file

@ -47,6 +47,7 @@ enum ObjSize {
S8x16,
}
#[allow(dead_code)]
struct LCDC {
enable: bool,
window_tilemap: TilemapArea,
@ -106,7 +107,7 @@ pub struct GPU {
impl Default for GPU {
fn default() -> Self {
let window = Window::new(
let mut window = Window::new(
"Tiles",
TILE_WINDOW_EDGE_LENGTH_SCALED,
TILE_WINDOW_EDGE_LENGTH_SCALED,
@ -115,6 +116,10 @@ impl Default for GPU {
.unwrap_or_else(|e| {
panic!("{}", e);
});
window.set_position((100 + (WIDTH * FACTOR)) as isize, 50);
window.topmost(true);
Self {
buffer: vec![0; WIDTH * HEIGHT],
scaled_buffer: vec![0; WIDTH * HEIGHT * 4],