From 710912d15096e2d569f26c747e28ee84339d2945 Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Fri, 24 Feb 2023 10:49:56 +1100 Subject: [PATCH] get bit from the wrong place --- src/processor/instructions/instructions.rs | 4 ++-- src/processor/instructions/primitives.rs | 4 ++-- src/processor/memory/mmio/gpu/tile_window.rs | 10 ++++------ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/processor/instructions/instructions.rs b/src/processor/instructions/instructions.rs index a4a5692..356665c 100644 --- a/src/processor/instructions/instructions.rs +++ b/src/processor/instructions/instructions.rs @@ -1,6 +1,6 @@ use crate::{ - processor::{get_bit, Cpu, Direction, Flags, Reg8, SplitRegister}, - util::{clear_bit, set_bit}, + processor::{Cpu, Direction, Flags, Reg8, SplitRegister}, + util::{clear_bit, get_bit, set_bit}, }; impl Cpu { diff --git a/src/processor/instructions/primitives.rs b/src/processor/instructions/primitives.rs index d46e2ed..cd61437 100644 --- a/src/processor/instructions/primitives.rs +++ b/src/processor/instructions/primitives.rs @@ -1,6 +1,6 @@ use crate::{ - processor::{get_bit, Cpu, Direction, Flags, SplitRegister}, - util::{get_rotation_carry, rotate}, + processor::{Cpu, Direction, Flags, SplitRegister}, + util::{get_bit, get_rotation_carry, rotate}, }; use std::ops::{BitAnd, BitOr}; diff --git a/src/processor/memory/mmio/gpu/tile_window.rs b/src/processor/memory/mmio/gpu/tile_window.rs index 8966f57..bb8986f 100644 --- a/src/processor/memory/mmio/gpu/tile_window.rs +++ b/src/processor/memory/mmio/gpu/tile_window.rs @@ -1,13 +1,11 @@ use minifb::Window; use crate::{ - processor::{ - get_bit, - memory::mmio::gpu::{ - scale_buffer, Palette, TiledataArea, TILE_WINDOW_HEIGHT, TILE_WINDOW_HEIGHT_SCALED, - TILE_WINDOW_WIDTH, TILE_WINDOW_WIDTH_SCALED, - }, + processor::memory::mmio::gpu::{ + scale_buffer, Palette, TiledataArea, TILE_WINDOW_HEIGHT, TILE_WINDOW_HEIGHT_SCALED, + TILE_WINDOW_WIDTH, TILE_WINDOW_WIDTH_SCALED, }, + util::get_bit, FACTOR, };