Clippy fix
This commit is contained in:
parent
45bffd1dcf
commit
7bd08d65de
1 changed files with 5 additions and 5 deletions
|
@ -80,13 +80,13 @@ impl Sdl2VideoDevice {
|
||||||
twobpp: bool,
|
twobpp: bool,
|
||||||
) {
|
) {
|
||||||
let v = BLENDING[4][color as usize];
|
let v = BLENDING[4][color as usize];
|
||||||
let h = v;
|
let _h = v;
|
||||||
let opaque = v;
|
let opaque = v;
|
||||||
for v in 0..8 {
|
for v in 0..8 {
|
||||||
let mut c: u8 = sprite[v] | (if twobpp { sprite[v + 8] } else { 0 }) << 8;
|
let mut c: u8 = sprite[v] | (if twobpp { sprite[v + 8] } else { 0 }) << 8;
|
||||||
|
|
||||||
for h in 7..0 {
|
for h in 7..0 {
|
||||||
c = c >> 1;
|
c >>= 1;
|
||||||
let ch = ((c & 1) | ((c >> 7) & 2)) as usize;
|
let ch = ((c & 1) | ((c >> 7) & 2)) as usize;
|
||||||
if opaque != 0 || ch != 0 {
|
if opaque != 0 || ch != 0 {
|
||||||
self.write_pixel(
|
self.write_pixel(
|
||||||
|
@ -110,7 +110,7 @@ impl Sdl2VideoDevice {
|
||||||
// Works in C's *u8 land, not clear it works in Rust.
|
// Works in C's *u8 land, not clear it works in Rust.
|
||||||
let mut shift = 4;
|
let mut shift = 4;
|
||||||
for i in 0..4 {
|
for i in 0..4 {
|
||||||
let r = (colors[0 + i / 2] >> shift) & 0x0f;
|
let r = (colors[i / 2] >> shift) & 0x0f;
|
||||||
let g = (colors[2 + i / 2] >> shift) & 0x0f;
|
let g = (colors[2 + i / 2] >> shift) & 0x0f;
|
||||||
let b = (colors[4 + i / 2] >> shift) & 0x0f;
|
let b = (colors[4 + i / 2] >> shift) & 0x0f;
|
||||||
|
|
||||||
|
@ -152,7 +152,7 @@ impl Sdl2VideoDevice {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Device for Sdl2VideoDevice {
|
impl Device for Sdl2VideoDevice {
|
||||||
fn dei1(&mut self, vm: &mut Uxn, port: u8) -> Result<u8, DeviceError> {
|
fn dei1(&mut self, _vm: &mut Uxn, port: u8) -> Result<u8, DeviceError> {
|
||||||
let slot = port & 0xF;
|
let slot = port & 0xF;
|
||||||
// FIXME: this is sorta copypasta, but LOTS of source byte order assumptions here.
|
// FIXME: this is sorta copypasta, but LOTS of source byte order assumptions here.
|
||||||
match slot {
|
match slot {
|
||||||
|
@ -169,7 +169,7 @@ impl Device for Sdl2VideoDevice {
|
||||||
/**
|
/**
|
||||||
* Callback used by UXN to do output through a "device".
|
* Callback used by UXN to do output through a "device".
|
||||||
*/
|
*/
|
||||||
fn deo1(&mut self, vm: &mut Uxn, port: u8, val: u8) -> Result<(), DeviceError> {
|
fn deo1(&mut self, _vm: &mut Uxn, port: u8, val: u8) -> Result<(), DeviceError> {
|
||||||
let slot = port & 0xF;
|
let slot = port & 0xF;
|
||||||
match slot {
|
match slot {
|
||||||
// Writing to the device vector
|
// Writing to the device vector
|
||||||
|
|
Loading…
Reference in a new issue